From eb33390f8de50320a8dde3ef4935641c5ff4bbbc Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 5 May 2023 05:13:44 +0000 Subject: [PATCH] CodeGen from PR 23827 in Azure/azure-rest-api-specs Merge f761aefce0a9bc53c14a95f9ebb480886c939514 into 1c4b161f7e259669789340da018051084209e3fe --- .../armpanngfw/CHANGELOG.md | 4 + .../armpanngfw/autorest.md | 6 +- ...jectglobalrulestack_client_example_test.go | 299 --- ...bjectlocalrulestack_client_example_test.go | 299 --- .../armpanngfw/constants.go | 2 +- .../firewalls_client_example_test.go | 1734 ----------------- .../firewallstatus_client_example_test.go | 170 -- ...listglobalrulestack_client_example_test.go | 311 --- ...nlistlocalrulestack_client_example_test.go | 311 --- .../globalrulestack_client_example_test.go | 987 ---------- .../paloaltonetworksngfw/armpanngfw/go.mod | 14 +- .../paloaltonetworksngfw/armpanngfw/go.sum | 22 +- .../localrules_client_example_test.go | 629 ------ .../localrulestacks_client_example_test.go | 1171 ----------- .../operations_client_example_test.go | 85 - .../postrules_client_example_test.go | 629 ------ ...listglobalrulestack_client_example_test.go | 303 --- ...xlistlocalrulestack_client_example_test.go | 303 --- .../prerules_client_example_test.go | 629 ------ 19 files changed, 14 insertions(+), 7894 deletions(-) delete mode 100644 sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/certificateobjectglobalrulestack_client_example_test.go delete mode 100644 sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/certificateobjectlocalrulestack_client_example_test.go delete mode 100644 sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/firewalls_client_example_test.go delete mode 100644 sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/firewallstatus_client_example_test.go delete mode 100644 sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/fqdnlistglobalrulestack_client_example_test.go delete mode 100644 sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/fqdnlistlocalrulestack_client_example_test.go delete mode 100644 sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/globalrulestack_client_example_test.go delete mode 100644 sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/localrules_client_example_test.go delete mode 100644 sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/localrulestacks_client_example_test.go delete mode 100644 sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/operations_client_example_test.go delete mode 100644 sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/postrules_client_example_test.go delete mode 100644 sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/prefixlistglobalrulestack_client_example_test.go delete mode 100644 sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/prefixlistlocalrulestack_client_example_test.go delete mode 100644 sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/prerules_client_example_test.go diff --git a/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/CHANGELOG.md b/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/CHANGELOG.md index 8033ec9495db..bb125177a308 100644 --- a/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/CHANGELOG.md +++ b/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History +## 0.1.1 (2023-05-05) +### Other Changes + + ## 0.1.0 (2023-04-28) The package of `github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw` is using our [next generation design principles](https://azure.github.io/azure-sdk/general_introduction.html). diff --git a/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/autorest.md b/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/autorest.md index d3112cc93b6d..2e0a0a7753cb 100644 --- a/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/autorest.md +++ b/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/autorest.md @@ -5,9 +5,9 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/readme.go.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/paloaltonetworks/resource-manager/readme.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/paloaltonetworks/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 0.1.0 +module-version: 0.1.1 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/certificateobjectglobalrulestack_client_example_test.go b/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/certificateobjectglobalrulestack_client_example_test.go deleted file mode 100644 index 7406b642e34e..000000000000 --- a/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/certificateobjectglobalrulestack_client_example_test.go +++ /dev/null @@ -1,299 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// 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. -// DO NOT EDIT. - -package armpanngfw_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/CertificateObjectGlobalRulestack_List_MaximumSet_Gen.json -func ExampleCertificateObjectGlobalRulestackClient_NewListPager_certificateObjectGlobalRulestackListMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewCertificateObjectGlobalRulestackClient().NewListPager("praval", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.CertificateObjectGlobalRulestackResourceListResult = armpanngfw.CertificateObjectGlobalRulestackResourceListResult{ - // Value: []*armpanngfw.CertificateObjectGlobalRulestackResource{ - // { - // Name: to.Ptr("armid1"), - // Type: to.Ptr("certificates"), - // ID: to.Ptr("/providers/PaloAltoNetworks.Cloudngfw/globalrulestacks/armid1/certificates/armid1"), - // SystemData: &armpanngfw.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // CreatedBy: to.Ptr("praval"), - // CreatedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // LastModifiedBy: to.Ptr("praval"), - // LastModifiedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // }, - // Properties: &armpanngfw.CertificateObject{ - // Description: to.Ptr("desc"), - // AuditComment: to.Ptr("comment"), - // CertificateSelfSigned: to.Ptr(armpanngfw.BooleanEnumTRUE), - // CertificateSignerResourceID: to.Ptr(""), - // Etag: to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c27"), - // ProvisioningState: to.Ptr(armpanngfw.ProvisioningStateSucceeded), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/CertificateObjectGlobalRulestack_List_MinimumSet_Gen.json -func ExampleCertificateObjectGlobalRulestackClient_NewListPager_certificateObjectGlobalRulestackListMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewCertificateObjectGlobalRulestackClient().NewListPager("praval", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.CertificateObjectGlobalRulestackResourceListResult = armpanngfw.CertificateObjectGlobalRulestackResourceListResult{ - // Value: []*armpanngfw.CertificateObjectGlobalRulestackResource{ - // { - // ID: to.Ptr("/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/praval/certificates/certificates1"), - // Properties: &armpanngfw.CertificateObject{ - // CertificateSelfSigned: to.Ptr(armpanngfw.BooleanEnumTRUE), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/CertificateObjectGlobalRulestack_Get_MaximumSet_Gen.json -func ExampleCertificateObjectGlobalRulestackClient_Get_certificateObjectGlobalRulestackGetMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewCertificateObjectGlobalRulestackClient().Get(ctx, "praval", "armid1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.CertificateObjectGlobalRulestackResource = armpanngfw.CertificateObjectGlobalRulestackResource{ - // Name: to.Ptr("armid1"), - // Type: to.Ptr("certificates"), - // ID: to.Ptr("/providers/PaloAltoNetworks.Cloudngfw/globalrulestacks/armid1/certificates/armid1"), - // SystemData: &armpanngfw.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // CreatedBy: to.Ptr("praval"), - // CreatedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // LastModifiedBy: to.Ptr("praval"), - // LastModifiedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // }, - // Properties: &armpanngfw.CertificateObject{ - // Description: to.Ptr("description"), - // AuditComment: to.Ptr("comment"), - // CertificateSelfSigned: to.Ptr(armpanngfw.BooleanEnumTRUE), - // CertificateSignerResourceID: to.Ptr(""), - // Etag: to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c27"), - // ProvisioningState: to.Ptr(armpanngfw.ProvisioningStateSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/CertificateObjectGlobalRulestack_Get_MinimumSet_Gen.json -func ExampleCertificateObjectGlobalRulestackClient_Get_certificateObjectGlobalRulestackGetMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewCertificateObjectGlobalRulestackClient().Get(ctx, "praval", "armid1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.CertificateObjectGlobalRulestackResource = armpanngfw.CertificateObjectGlobalRulestackResource{ - // ID: to.Ptr("/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/praval/certificates/armid1"), - // Properties: &armpanngfw.CertificateObject{ - // CertificateSelfSigned: to.Ptr(armpanngfw.BooleanEnumTRUE), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/CertificateObjectGlobalRulestack_CreateOrUpdate_MaximumSet_Gen.json -func ExampleCertificateObjectGlobalRulestackClient_BeginCreateOrUpdate_certificateObjectGlobalRulestackCreateOrUpdateMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewCertificateObjectGlobalRulestackClient().BeginCreateOrUpdate(ctx, "praval", "armid1", armpanngfw.CertificateObjectGlobalRulestackResource{ - Properties: &armpanngfw.CertificateObject{ - Description: to.Ptr("description"), - AuditComment: to.Ptr("comment"), - CertificateSelfSigned: to.Ptr(armpanngfw.BooleanEnumTRUE), - CertificateSignerResourceID: to.Ptr(""), - Etag: to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c27"), - ProvisioningState: to.Ptr(armpanngfw.ProvisioningStateAccepted), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.CertificateObjectGlobalRulestackResource = armpanngfw.CertificateObjectGlobalRulestackResource{ - // Name: to.Ptr("armid1"), - // Type: to.Ptr("certificates"), - // ID: to.Ptr("/providers/PaloAltoNetworks.Cloudngfw/globalrulestacks/armid1/certificates/armid1"), - // SystemData: &armpanngfw.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // CreatedBy: to.Ptr("praval"), - // CreatedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // LastModifiedBy: to.Ptr("praval"), - // LastModifiedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // }, - // Properties: &armpanngfw.CertificateObject{ - // Description: to.Ptr("description"), - // AuditComment: to.Ptr("comment"), - // CertificateSelfSigned: to.Ptr(armpanngfw.BooleanEnumTRUE), - // CertificateSignerResourceID: to.Ptr(""), - // Etag: to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c27"), - // ProvisioningState: to.Ptr(armpanngfw.ProvisioningStateSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/CertificateObjectGlobalRulestack_CreateOrUpdate_MinimumSet_Gen.json -func ExampleCertificateObjectGlobalRulestackClient_BeginCreateOrUpdate_certificateObjectGlobalRulestackCreateOrUpdateMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewCertificateObjectGlobalRulestackClient().BeginCreateOrUpdate(ctx, "praval", "armid1", armpanngfw.CertificateObjectGlobalRulestackResource{ - Properties: &armpanngfw.CertificateObject{ - CertificateSelfSigned: to.Ptr(armpanngfw.BooleanEnumTRUE), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.CertificateObjectGlobalRulestackResource = armpanngfw.CertificateObjectGlobalRulestackResource{ - // ID: to.Ptr("/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/praval/certificates/armid1"), - // Properties: &armpanngfw.CertificateObject{ - // CertificateSelfSigned: to.Ptr(armpanngfw.BooleanEnumTRUE), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/CertificateObjectGlobalRulestack_Delete_MaximumSet_Gen.json -func ExampleCertificateObjectGlobalRulestackClient_BeginDelete_certificateObjectGlobalRulestackDeleteMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewCertificateObjectGlobalRulestackClient().BeginDelete(ctx, "praval", "armid1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/CertificateObjectGlobalRulestack_Delete_MinimumSet_Gen.json -func ExampleCertificateObjectGlobalRulestackClient_BeginDelete_certificateObjectGlobalRulestackDeleteMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewCertificateObjectGlobalRulestackClient().BeginDelete(ctx, "praval", "armid1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/certificateobjectlocalrulestack_client_example_test.go b/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/certificateobjectlocalrulestack_client_example_test.go deleted file mode 100644 index b29605d1fed7..000000000000 --- a/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/certificateobjectlocalrulestack_client_example_test.go +++ /dev/null @@ -1,299 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// 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. -// DO NOT EDIT. - -package armpanngfw_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/CertificateObjectLocalRulestack_ListByLocalRulestacks_MaximumSet_Gen.json -func ExampleCertificateObjectLocalRulestackClient_NewListByLocalRulestacksPager_certificateObjectLocalRulestackListByLocalRulestacksMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewCertificateObjectLocalRulestackClient().NewListByLocalRulestacksPager("rgopenapi", "lrs1", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.CertificateObjectLocalRulestackResourceListResult = armpanngfw.CertificateObjectLocalRulestackResourceListResult{ - // Value: []*armpanngfw.CertificateObjectLocalRulestackResource{ - // { - // Name: to.Ptr("armid1"), - // Type: to.Ptr("certificates"), - // ID: to.Ptr("/providers/PaloAltoNetworks.Cloudngfw/globalrulestacks/armid1/certificates/armid1"), - // SystemData: &armpanngfw.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // CreatedBy: to.Ptr("praval"), - // CreatedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // LastModifiedBy: to.Ptr("praval"), - // LastModifiedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // }, - // Properties: &armpanngfw.CertificateObject{ - // Description: to.Ptr("desc"), - // AuditComment: to.Ptr("comment"), - // CertificateSelfSigned: to.Ptr(armpanngfw.BooleanEnumTRUE), - // CertificateSignerResourceID: to.Ptr(""), - // Etag: to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c27"), - // ProvisioningState: to.Ptr(armpanngfw.ProvisioningStateSucceeded), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/CertificateObjectLocalRulestack_ListByLocalRulestacks_MinimumSet_Gen.json -func ExampleCertificateObjectLocalRulestackClient_NewListByLocalRulestacksPager_certificateObjectLocalRulestackListByLocalRulestacksMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewCertificateObjectLocalRulestackClient().NewListByLocalRulestacksPager("rgopenapi", "lrs1", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.CertificateObjectLocalRulestackResourceListResult = armpanngfw.CertificateObjectLocalRulestackResourceListResult{ - // Value: []*armpanngfw.CertificateObjectLocalRulestackResource{ - // { - // ID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourcegroups/rgopenapi/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/praval/certificates/certificates1"), - // Properties: &armpanngfw.CertificateObject{ - // CertificateSelfSigned: to.Ptr(armpanngfw.BooleanEnumTRUE), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/CertificateObjectLocalRulestack_Get_MaximumSet_Gen.json -func ExampleCertificateObjectLocalRulestackClient_Get_certificateObjectLocalRulestackGetMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewCertificateObjectLocalRulestackClient().Get(ctx, "rgopenapi", "lrs1", "armid1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.CertificateObjectLocalRulestackResource = armpanngfw.CertificateObjectLocalRulestackResource{ - // Name: to.Ptr("armid1"), - // Type: to.Ptr("certificates"), - // ID: to.Ptr("/providers/PaloAltoNetworks.Cloudngfw/globalrulestacks/armid1/certificates/armid1"), - // SystemData: &armpanngfw.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // CreatedBy: to.Ptr("praval"), - // CreatedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // LastModifiedBy: to.Ptr("praval"), - // LastModifiedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // }, - // Properties: &armpanngfw.CertificateObject{ - // Description: to.Ptr("description"), - // AuditComment: to.Ptr("comment"), - // CertificateSelfSigned: to.Ptr(armpanngfw.BooleanEnumTRUE), - // CertificateSignerResourceID: to.Ptr(""), - // Etag: to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c27"), - // ProvisioningState: to.Ptr(armpanngfw.ProvisioningStateSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/CertificateObjectLocalRulestack_Get_MinimumSet_Gen.json -func ExampleCertificateObjectLocalRulestackClient_Get_certificateObjectLocalRulestackGetMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewCertificateObjectLocalRulestackClient().Get(ctx, "rgopenapi", "lrs1", "armid1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.CertificateObjectLocalRulestackResource = armpanngfw.CertificateObjectLocalRulestackResource{ - // ID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourcegroups/rgopenapi/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/praval/certificates/armid1"), - // Properties: &armpanngfw.CertificateObject{ - // CertificateSelfSigned: to.Ptr(armpanngfw.BooleanEnumTRUE), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/CertificateObjectLocalRulestack_CreateOrUpdate_MaximumSet_Gen.json -func ExampleCertificateObjectLocalRulestackClient_BeginCreateOrUpdate_certificateObjectLocalRulestackCreateOrUpdateMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewCertificateObjectLocalRulestackClient().BeginCreateOrUpdate(ctx, "rgopenapi", "lrs1", "armid1", armpanngfw.CertificateObjectLocalRulestackResource{ - Properties: &armpanngfw.CertificateObject{ - Description: to.Ptr("description"), - AuditComment: to.Ptr("comment"), - CertificateSelfSigned: to.Ptr(armpanngfw.BooleanEnumTRUE), - CertificateSignerResourceID: to.Ptr(""), - Etag: to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c27"), - ProvisioningState: to.Ptr(armpanngfw.ProvisioningStateAccepted), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.CertificateObjectLocalRulestackResource = armpanngfw.CertificateObjectLocalRulestackResource{ - // Name: to.Ptr("armid1"), - // Type: to.Ptr("certificates"), - // ID: to.Ptr("/providers/PaloAltoNetworks.Cloudngfw/globalrulestacks/armid1/certificates/armid1"), - // SystemData: &armpanngfw.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // CreatedBy: to.Ptr("praval"), - // CreatedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // LastModifiedBy: to.Ptr("praval"), - // LastModifiedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // }, - // Properties: &armpanngfw.CertificateObject{ - // Description: to.Ptr("description"), - // AuditComment: to.Ptr("comment"), - // CertificateSelfSigned: to.Ptr(armpanngfw.BooleanEnumTRUE), - // CertificateSignerResourceID: to.Ptr(""), - // Etag: to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c27"), - // ProvisioningState: to.Ptr(armpanngfw.ProvisioningStateSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/CertificateObjectLocalRulestack_CreateOrUpdate_MinimumSet_Gen.json -func ExampleCertificateObjectLocalRulestackClient_BeginCreateOrUpdate_certificateObjectLocalRulestackCreateOrUpdateMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewCertificateObjectLocalRulestackClient().BeginCreateOrUpdate(ctx, "rgopenapi", "lrs1", "armid1", armpanngfw.CertificateObjectLocalRulestackResource{ - Properties: &armpanngfw.CertificateObject{ - CertificateSelfSigned: to.Ptr(armpanngfw.BooleanEnumTRUE), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.CertificateObjectLocalRulestackResource = armpanngfw.CertificateObjectLocalRulestackResource{ - // ID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourcegroups/rgopenapi/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/praval/certificates/armid1"), - // Properties: &armpanngfw.CertificateObject{ - // CertificateSelfSigned: to.Ptr(armpanngfw.BooleanEnumTRUE), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/CertificateObjectLocalRulestack_Delete_MaximumSet_Gen.json -func ExampleCertificateObjectLocalRulestackClient_BeginDelete_certificateObjectLocalRulestackDeleteMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewCertificateObjectLocalRulestackClient().BeginDelete(ctx, "rgopenapi", "lrs1", "armid1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/CertificateObjectLocalRulestack_Delete_MinimumSet_Gen.json -func ExampleCertificateObjectLocalRulestackClient_BeginDelete_certificateObjectLocalRulestackDeleteMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewCertificateObjectLocalRulestackClient().BeginDelete(ctx, "rgopenapi", "lrs1", "armid1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/constants.go b/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/constants.go index 69b6941017ed..df318b289498 100644 --- a/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/constants.go +++ b/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/constants.go @@ -11,7 +11,7 @@ package armpanngfw const ( moduleName = "armpanngfw" - moduleVersion = "v0.1.0" + moduleVersion = "v0.1.1" ) type ActionEnum string diff --git a/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/firewalls_client_example_test.go b/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/firewalls_client_example_test.go deleted file mode 100644 index ea7a1961f110..000000000000 --- a/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/firewalls_client_example_test.go +++ /dev/null @@ -1,1734 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// 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. -// DO NOT EDIT. - -package armpanngfw_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_ListBySubscription_MaximumSet_Gen.json -func ExampleFirewallsClient_NewListBySubscriptionPager_firewallsListBySubscriptionMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewFirewallsClient().NewListBySubscriptionPager(nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.FirewallResourceListResult = armpanngfw.FirewallResourceListResult{ - // Value: []*armpanngfw.FirewallResource{ - // { - // Name: to.Ptr("aaaaaaaaaaaaa"), - // Type: to.Ptr("aaaaaa"), - // ID: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaa"), - // SystemData: &armpanngfw.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // CreatedBy: to.Ptr("praval"), - // CreatedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // LastModifiedBy: to.Ptr("praval"), - // LastModifiedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // }, - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "tagName": to.Ptr("value"), - // }, - // Identity: &armpanngfw.AzureResourceManagerManagedIdentityProperties{ - // Type: to.Ptr(armpanngfw.ManagedIdentityTypeNone), - // PrincipalID: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaa"), - // TenantID: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // UserAssignedIdentities: map[string]*armpanngfw.AzureResourceManagerUserAssignedIdentity{ - // "key16": &armpanngfw.AzureResourceManagerUserAssignedIdentity{ - // ClientID: to.Ptr("aaaa"), - // PrincipalID: to.Ptr("aaaaaaaaaaaaaaa"), - // }, - // }, - // }, - // Properties: &armpanngfw.FirewallDeploymentProperties{ - // AssociatedRulestack: &armpanngfw.RulestackDetails{ - // Location: to.Ptr("eastus"), - // ResourceID: to.Ptr("aaaaaaaaaa"), - // RulestackID: to.Ptr("aaaaaaaaaaaaaaaa"), - // }, - // DNSSettings: &armpanngfw.DNSSettings{ - // DNSServers: []*armpanngfw.IPAddress{ - // { - // Address: to.Ptr("20.22.92.111"), - // ResourceID: to.Ptr("/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-egressNatIp1"), - // }}, - // EnableDNSProxy: to.Ptr(armpanngfw.DNSProxyDISABLED), - // EnabledDNSType: to.Ptr(armpanngfw.EnabledDNSTypeCUSTOM), - // }, - // FrontEndSettings: []*armpanngfw.FrontendSetting{ - // { - // Name: to.Ptr("frontendsetting11"), - // BackendConfiguration: &armpanngfw.EndpointConfiguration{ - // Address: &armpanngfw.IPAddress{ - // Address: to.Ptr("20.22.32.136"), - // ResourceID: to.Ptr("/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-frontendSettingIp2"), - // }, - // Port: to.Ptr("80"), - // }, - // FrontendConfiguration: &armpanngfw.EndpointConfiguration{ - // Address: &armpanngfw.IPAddress{ - // Address: to.Ptr("20.22.91.251"), - // ResourceID: to.Ptr("/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-frontendSettingIp1"), - // }, - // Port: to.Ptr("80"), - // }, - // Protocol: to.Ptr(armpanngfw.ProtocolTypeTCP), - // }}, - // IsPanoramaManaged: to.Ptr(armpanngfw.BooleanEnumTRUE), - // MarketplaceDetails: &armpanngfw.MarketplaceDetails{ - // MarketplaceSubscriptionID: to.Ptr("aa"), - // MarketplaceSubscriptionStatus: to.Ptr(armpanngfw.MarketplaceSubscriptionStatusPendingFulfillmentStart), - // OfferID: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // PublisherID: to.Ptr("aaaa"), - // }, - // NetworkProfile: &armpanngfw.NetworkProfile{ - // EgressNatIP: []*armpanngfw.IPAddress{ - // { - // Address: to.Ptr("20.22.92.111"), - // ResourceID: to.Ptr("/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-egressNatIp1"), - // }}, - // EnableEgressNat: to.Ptr(armpanngfw.EgressNatENABLED), - // NetworkType: to.Ptr(armpanngfw.NetworkTypeVNET), - // PublicIPs: []*armpanngfw.IPAddress{ - // { - // Address: to.Ptr("20.22.92.11"), - // ResourceID: to.Ptr("/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-PublicIp1"), - // }}, - // VnetConfiguration: &armpanngfw.VnetConfiguration{ - // IPOfTrustSubnetForUdr: &armpanngfw.IPAddress{ - // Address: to.Ptr("10.1.1.0/24"), - // ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet"), - // }, - // TrustSubnet: &armpanngfw.IPAddressSpace{ - // AddressSpace: to.Ptr("10.1.1.0/24"), - // ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-trust-subnet"), - // }, - // UnTrustSubnet: &armpanngfw.IPAddressSpace{ - // AddressSpace: to.Ptr("10.1.1.0/24"), - // ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet"), - // }, - // Vnet: &armpanngfw.IPAddressSpace{ - // AddressSpace: to.Ptr("10.1.0.0/16"), - // ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet"), - // }, - // }, - // VwanConfiguration: &armpanngfw.VwanConfiguration{ - // IPOfTrustSubnetForUdr: &armpanngfw.IPAddress{ - // Address: to.Ptr("10.1.1.0/24"), - // ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet"), - // }, - // NetworkVirtualApplianceID: to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c12"), - // TrustSubnet: &armpanngfw.IPAddressSpace{ - // AddressSpace: to.Ptr("10.1.1.0/24"), - // ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-trust-subnet"), - // }, - // UnTrustSubnet: &armpanngfw.IPAddressSpace{ - // AddressSpace: to.Ptr("10.1.1.0/24"), - // ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet"), - // }, - // VHub: &armpanngfw.IPAddressSpace{ - // AddressSpace: to.Ptr("10.1.1.0/24"), - // ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet"), - // }, - // }, - // }, - // PanEtag: to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c12"), - // PanoramaConfig: &armpanngfw.PanoramaConfig{ - // CgName: to.Ptr("PanoramaCollectorGroup"), - // ConfigString: to.Ptr("bas64EncodedString"), - // DgName: to.Ptr("PanoramaDeviceGroup"), - // HostName: to.Ptr("hostname"), - // PanoramaServer: to.Ptr("10.25.1.1"), - // PanoramaServer2: to.Ptr("10.20.1.1"), - // TplName: to.Ptr("PanoramaTemplateStack"), - // VMAuthKey: to.Ptr("SSH_AUTH_KEY"), - // }, - // PlanData: &armpanngfw.PlanData{ - // BillingCycle: to.Ptr(armpanngfw.BillingCycleWEEKLY), - // EffectiveDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-13T00:46:05.283Z"); return t}()), - // PlanID: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // UsageType: to.Ptr(armpanngfw.UsageTypePAYG), - // }, - // ProvisioningState: to.Ptr(armpanngfw.ProvisioningStateSucceeded), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_ListBySubscription_MinimumSet_Gen.json -func ExampleFirewallsClient_NewListBySubscriptionPager_firewallsListBySubscriptionMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewFirewallsClient().NewListBySubscriptionPager(nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.FirewallResourceListResult = armpanngfw.FirewallResourceListResult{ - // Value: []*armpanngfw.FirewallResource{ - // { - // ID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/providers/PaloAltoNetworks.Cloudngfw/firewalls/firewall"), - // Location: to.Ptr("eastus"), - // Properties: &armpanngfw.FirewallDeploymentProperties{ - // DNSSettings: &armpanngfw.DNSSettings{ - // }, - // MarketplaceDetails: &armpanngfw.MarketplaceDetails{ - // OfferID: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // PublisherID: to.Ptr("aaaa"), - // }, - // NetworkProfile: &armpanngfw.NetworkProfile{ - // EnableEgressNat: to.Ptr(armpanngfw.EgressNatENABLED), - // NetworkType: to.Ptr(armpanngfw.NetworkTypeVNET), - // PublicIPs: []*armpanngfw.IPAddress{ - // { - // Address: to.Ptr("20.22.92.11"), - // ResourceID: to.Ptr("/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-PublicIp1"), - // }}, - // }, - // PlanData: &armpanngfw.PlanData{ - // BillingCycle: to.Ptr(armpanngfw.BillingCycleWEEKLY), - // PlanID: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_ListByResourceGroup_MaximumSet_Gen.json -func ExampleFirewallsClient_NewListByResourceGroupPager_firewallsListByResourceGroupMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewFirewallsClient().NewListByResourceGroupPager("firewall-rg", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.FirewallResourceListResult = armpanngfw.FirewallResourceListResult{ - // Value: []*armpanngfw.FirewallResource{ - // { - // Name: to.Ptr("aaaaaaaaaaaaa"), - // Type: to.Ptr("aaaaaa"), - // ID: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaa"), - // SystemData: &armpanngfw.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // CreatedBy: to.Ptr("praval"), - // CreatedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // LastModifiedBy: to.Ptr("praval"), - // LastModifiedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // }, - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "tagName": to.Ptr("value"), - // }, - // Identity: &armpanngfw.AzureResourceManagerManagedIdentityProperties{ - // Type: to.Ptr(armpanngfw.ManagedIdentityTypeNone), - // PrincipalID: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaa"), - // TenantID: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // UserAssignedIdentities: map[string]*armpanngfw.AzureResourceManagerUserAssignedIdentity{ - // "key16": &armpanngfw.AzureResourceManagerUserAssignedIdentity{ - // ClientID: to.Ptr("aaaa"), - // PrincipalID: to.Ptr("aaaaaaaaaaaaaaa"), - // }, - // }, - // }, - // Properties: &armpanngfw.FirewallDeploymentProperties{ - // AssociatedRulestack: &armpanngfw.RulestackDetails{ - // Location: to.Ptr("eastus"), - // ResourceID: to.Ptr("aaaaaaaaaa"), - // RulestackID: to.Ptr("aaaaaaaaaaaaaaaa"), - // }, - // DNSSettings: &armpanngfw.DNSSettings{ - // DNSServers: []*armpanngfw.IPAddress{ - // { - // Address: to.Ptr("20.22.92.111"), - // ResourceID: to.Ptr("/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-egressNatIp1"), - // }}, - // EnableDNSProxy: to.Ptr(armpanngfw.DNSProxyDISABLED), - // EnabledDNSType: to.Ptr(armpanngfw.EnabledDNSTypeCUSTOM), - // }, - // FrontEndSettings: []*armpanngfw.FrontendSetting{ - // { - // Name: to.Ptr("frontendsetting11"), - // BackendConfiguration: &armpanngfw.EndpointConfiguration{ - // Address: &armpanngfw.IPAddress{ - // Address: to.Ptr("20.22.32.136"), - // ResourceID: to.Ptr("/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-frontendSettingIp2"), - // }, - // Port: to.Ptr("80"), - // }, - // FrontendConfiguration: &armpanngfw.EndpointConfiguration{ - // Address: &armpanngfw.IPAddress{ - // Address: to.Ptr("20.22.91.251"), - // ResourceID: to.Ptr("/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-frontendSettingIp1"), - // }, - // Port: to.Ptr("80"), - // }, - // Protocol: to.Ptr(armpanngfw.ProtocolTypeTCP), - // }}, - // IsPanoramaManaged: to.Ptr(armpanngfw.BooleanEnumTRUE), - // MarketplaceDetails: &armpanngfw.MarketplaceDetails{ - // MarketplaceSubscriptionID: to.Ptr("aa"), - // MarketplaceSubscriptionStatus: to.Ptr(armpanngfw.MarketplaceSubscriptionStatusPendingFulfillmentStart), - // OfferID: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // PublisherID: to.Ptr("aaaa"), - // }, - // NetworkProfile: &armpanngfw.NetworkProfile{ - // EgressNatIP: []*armpanngfw.IPAddress{ - // { - // Address: to.Ptr("20.22.92.111"), - // ResourceID: to.Ptr("/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-egressNatIp1"), - // }}, - // EnableEgressNat: to.Ptr(armpanngfw.EgressNatENABLED), - // NetworkType: to.Ptr(armpanngfw.NetworkTypeVNET), - // PublicIPs: []*armpanngfw.IPAddress{ - // { - // Address: to.Ptr("20.22.92.11"), - // ResourceID: to.Ptr("/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-PublicIp1"), - // }}, - // VnetConfiguration: &armpanngfw.VnetConfiguration{ - // IPOfTrustSubnetForUdr: &armpanngfw.IPAddress{ - // Address: to.Ptr("10.1.1.0/24"), - // ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet"), - // }, - // TrustSubnet: &armpanngfw.IPAddressSpace{ - // AddressSpace: to.Ptr("10.1.1.0/24"), - // ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-trust-subnet"), - // }, - // UnTrustSubnet: &armpanngfw.IPAddressSpace{ - // AddressSpace: to.Ptr("10.1.1.0/24"), - // ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet"), - // }, - // Vnet: &armpanngfw.IPAddressSpace{ - // AddressSpace: to.Ptr("10.1.0.0/16"), - // ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet"), - // }, - // }, - // VwanConfiguration: &armpanngfw.VwanConfiguration{ - // IPOfTrustSubnetForUdr: &armpanngfw.IPAddress{ - // Address: to.Ptr("10.1.1.0/24"), - // ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet"), - // }, - // NetworkVirtualApplianceID: to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c12"), - // TrustSubnet: &armpanngfw.IPAddressSpace{ - // AddressSpace: to.Ptr("10.1.1.0/24"), - // ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-trust-subnet"), - // }, - // UnTrustSubnet: &armpanngfw.IPAddressSpace{ - // AddressSpace: to.Ptr("10.1.1.0/24"), - // ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet"), - // }, - // VHub: &armpanngfw.IPAddressSpace{ - // AddressSpace: to.Ptr("10.1.1.0/24"), - // ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet"), - // }, - // }, - // }, - // PanEtag: to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c12"), - // PanoramaConfig: &armpanngfw.PanoramaConfig{ - // CgName: to.Ptr("PanoramaCollectorGroup"), - // ConfigString: to.Ptr("bas64EncodedString"), - // DgName: to.Ptr("PanoramaDeviceGroup"), - // HostName: to.Ptr("hostname"), - // PanoramaServer: to.Ptr("10.25.1.1"), - // PanoramaServer2: to.Ptr("10.20.1.1"), - // TplName: to.Ptr("PanoramaTemplateStack"), - // VMAuthKey: to.Ptr("SSH_AUTH_KEY"), - // }, - // PlanData: &armpanngfw.PlanData{ - // BillingCycle: to.Ptr(armpanngfw.BillingCycleWEEKLY), - // EffectiveDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-13T00:46:05.283Z"); return t}()), - // PlanID: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // UsageType: to.Ptr(armpanngfw.UsageTypePAYG), - // }, - // ProvisioningState: to.Ptr(armpanngfw.ProvisioningStateSucceeded), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_ListByResourceGroup_MinimumSet_Gen.json -func ExampleFirewallsClient_NewListByResourceGroupPager_firewallsListByResourceGroupMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewFirewallsClient().NewListByResourceGroupPager("firewall-rg", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.FirewallResourceListResult = armpanngfw.FirewallResourceListResult{ - // Value: []*armpanngfw.FirewallResource{ - // { - // ID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourcegroups/firewall-rg/providers/PaloAltoNetworks.Cloudngfw/firewalls/firewall"), - // Location: to.Ptr("eastus"), - // Properties: &armpanngfw.FirewallDeploymentProperties{ - // DNSSettings: &armpanngfw.DNSSettings{ - // }, - // MarketplaceDetails: &armpanngfw.MarketplaceDetails{ - // OfferID: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // PublisherID: to.Ptr("aaaa"), - // }, - // NetworkProfile: &armpanngfw.NetworkProfile{ - // EnableEgressNat: to.Ptr(armpanngfw.EgressNatENABLED), - // NetworkType: to.Ptr(armpanngfw.NetworkTypeVNET), - // PublicIPs: []*armpanngfw.IPAddress{ - // { - // Address: to.Ptr("20.22.92.11"), - // ResourceID: to.Ptr("/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-PublicIp1"), - // }}, - // }, - // PlanData: &armpanngfw.PlanData{ - // BillingCycle: to.Ptr(armpanngfw.BillingCycleWEEKLY), - // PlanID: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_Get_MaximumSet_Gen.json -func ExampleFirewallsClient_Get_firewallsGetMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewFirewallsClient().Get(ctx, "firewall-rg", "firewall1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.FirewallResource = armpanngfw.FirewallResource{ - // Name: to.Ptr("aaaaaaaaaaaaa"), - // Type: to.Ptr("aaaaaa"), - // ID: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaa"), - // SystemData: &armpanngfw.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // CreatedBy: to.Ptr("praval"), - // CreatedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // LastModifiedBy: to.Ptr("praval"), - // LastModifiedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // }, - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "tagName": to.Ptr("value"), - // }, - // Identity: &armpanngfw.AzureResourceManagerManagedIdentityProperties{ - // Type: to.Ptr(armpanngfw.ManagedIdentityTypeNone), - // PrincipalID: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaa"), - // TenantID: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // UserAssignedIdentities: map[string]*armpanngfw.AzureResourceManagerUserAssignedIdentity{ - // "key16": &armpanngfw.AzureResourceManagerUserAssignedIdentity{ - // ClientID: to.Ptr("aaaa"), - // PrincipalID: to.Ptr("aaaaaaaaaaaaaaa"), - // }, - // }, - // }, - // Properties: &armpanngfw.FirewallDeploymentProperties{ - // AssociatedRulestack: &armpanngfw.RulestackDetails{ - // Location: to.Ptr("eastus"), - // ResourceID: to.Ptr("aaaaaaaaaa"), - // RulestackID: to.Ptr("aaaaaaaaaaaaaaaa"), - // }, - // DNSSettings: &armpanngfw.DNSSettings{ - // DNSServers: []*armpanngfw.IPAddress{ - // { - // Address: to.Ptr("20.22.92.111"), - // ResourceID: to.Ptr("/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-egressNatIp1"), - // }}, - // EnableDNSProxy: to.Ptr(armpanngfw.DNSProxyDISABLED), - // EnabledDNSType: to.Ptr(armpanngfw.EnabledDNSTypeCUSTOM), - // }, - // FrontEndSettings: []*armpanngfw.FrontendSetting{ - // { - // Name: to.Ptr("frontendsetting11"), - // BackendConfiguration: &armpanngfw.EndpointConfiguration{ - // Address: &armpanngfw.IPAddress{ - // Address: to.Ptr("20.22.32.136"), - // ResourceID: to.Ptr("/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-frontendSettingIp2"), - // }, - // Port: to.Ptr("80"), - // }, - // FrontendConfiguration: &armpanngfw.EndpointConfiguration{ - // Address: &armpanngfw.IPAddress{ - // Address: to.Ptr("20.22.91.251"), - // ResourceID: to.Ptr("/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-frontendSettingIp1"), - // }, - // Port: to.Ptr("80"), - // }, - // Protocol: to.Ptr(armpanngfw.ProtocolTypeTCP), - // }}, - // IsPanoramaManaged: to.Ptr(armpanngfw.BooleanEnumTRUE), - // MarketplaceDetails: &armpanngfw.MarketplaceDetails{ - // MarketplaceSubscriptionID: to.Ptr("aa"), - // MarketplaceSubscriptionStatus: to.Ptr(armpanngfw.MarketplaceSubscriptionStatusPendingFulfillmentStart), - // OfferID: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // PublisherID: to.Ptr("aaaa"), - // }, - // NetworkProfile: &armpanngfw.NetworkProfile{ - // EgressNatIP: []*armpanngfw.IPAddress{ - // { - // Address: to.Ptr("20.22.92.111"), - // ResourceID: to.Ptr("/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-egressNatIp1"), - // }}, - // EnableEgressNat: to.Ptr(armpanngfw.EgressNatENABLED), - // NetworkType: to.Ptr(armpanngfw.NetworkTypeVNET), - // PublicIPs: []*armpanngfw.IPAddress{ - // { - // Address: to.Ptr("20.22.92.11"), - // ResourceID: to.Ptr("/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-PublicIp1"), - // }}, - // VnetConfiguration: &armpanngfw.VnetConfiguration{ - // IPOfTrustSubnetForUdr: &armpanngfw.IPAddress{ - // Address: to.Ptr("10.1.1.0/24"), - // ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet"), - // }, - // TrustSubnet: &armpanngfw.IPAddressSpace{ - // AddressSpace: to.Ptr("10.1.1.0/24"), - // ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-trust-subnet"), - // }, - // UnTrustSubnet: &armpanngfw.IPAddressSpace{ - // AddressSpace: to.Ptr("10.1.1.0/24"), - // ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet"), - // }, - // Vnet: &armpanngfw.IPAddressSpace{ - // AddressSpace: to.Ptr("10.1.0.0/16"), - // ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet"), - // }, - // }, - // VwanConfiguration: &armpanngfw.VwanConfiguration{ - // IPOfTrustSubnetForUdr: &armpanngfw.IPAddress{ - // Address: to.Ptr("10.1.1.0/24"), - // ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet"), - // }, - // NetworkVirtualApplianceID: to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c12"), - // TrustSubnet: &armpanngfw.IPAddressSpace{ - // AddressSpace: to.Ptr("10.1.1.0/24"), - // ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-trust-subnet"), - // }, - // UnTrustSubnet: &armpanngfw.IPAddressSpace{ - // AddressSpace: to.Ptr("10.1.1.0/24"), - // ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet"), - // }, - // VHub: &armpanngfw.IPAddressSpace{ - // AddressSpace: to.Ptr("10.1.1.0/24"), - // ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet"), - // }, - // }, - // }, - // PanEtag: to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c12"), - // PanoramaConfig: &armpanngfw.PanoramaConfig{ - // CgName: to.Ptr("PanoramaCollectorGroup"), - // ConfigString: to.Ptr("bas64EncodedString"), - // DgName: to.Ptr("PanoramaDeviceGroup"), - // HostName: to.Ptr("hostname"), - // PanoramaServer: to.Ptr("10.25.1.1"), - // PanoramaServer2: to.Ptr("10.20.1.1"), - // TplName: to.Ptr("PanoramaTemplateStack"), - // VMAuthKey: to.Ptr("SSH_AUTH_KEY"), - // }, - // PlanData: &armpanngfw.PlanData{ - // BillingCycle: to.Ptr(armpanngfw.BillingCycleWEEKLY), - // EffectiveDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-13T00:46:05.283Z"); return t}()), - // PlanID: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // UsageType: to.Ptr(armpanngfw.UsageTypePAYG), - // }, - // ProvisioningState: to.Ptr(armpanngfw.ProvisioningStateSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_Get_MinimumSet_Gen.json -func ExampleFirewallsClient_Get_firewallsGetMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewFirewallsClient().Get(ctx, "firewall-rg", "firewall1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.FirewallResource = armpanngfw.FirewallResource{ - // ID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourcegroups/firewall-rg/providers/PaloAltoNetworks.Cloudngfw/firewalls/firewall1"), - // Location: to.Ptr("eastus"), - // Properties: &armpanngfw.FirewallDeploymentProperties{ - // DNSSettings: &armpanngfw.DNSSettings{ - // }, - // MarketplaceDetails: &armpanngfw.MarketplaceDetails{ - // OfferID: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // PublisherID: to.Ptr("aaaa"), - // }, - // NetworkProfile: &armpanngfw.NetworkProfile{ - // EnableEgressNat: to.Ptr(armpanngfw.EgressNatENABLED), - // NetworkType: to.Ptr(armpanngfw.NetworkTypeVNET), - // PublicIPs: []*armpanngfw.IPAddress{ - // { - // Address: to.Ptr("20.22.92.11"), - // ResourceID: to.Ptr("/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-PublicIp1"), - // }}, - // }, - // PlanData: &armpanngfw.PlanData{ - // BillingCycle: to.Ptr(armpanngfw.BillingCycleWEEKLY), - // PlanID: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_CreateOrUpdate_MaximumSet_Gen.json -func ExampleFirewallsClient_BeginCreateOrUpdate_firewallsCreateOrUpdateMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewFirewallsClient().BeginCreateOrUpdate(ctx, "firewall-rg", "firewall1", armpanngfw.FirewallResource{ - Location: to.Ptr("eastus"), - Tags: map[string]*string{ - "tagName": to.Ptr("value"), - }, - Identity: &armpanngfw.AzureResourceManagerManagedIdentityProperties{ - Type: to.Ptr(armpanngfw.ManagedIdentityTypeNone), - UserAssignedIdentities: map[string]*armpanngfw.AzureResourceManagerUserAssignedIdentity{ - "key16": { - ClientID: to.Ptr("aaaa"), - PrincipalID: to.Ptr("aaaaaaaaaaaaaaa"), - }, - }, - }, - Properties: &armpanngfw.FirewallDeploymentProperties{ - AssociatedRulestack: &armpanngfw.RulestackDetails{ - Location: to.Ptr("eastus"), - ResourceID: to.Ptr("lrs1"), - RulestackID: to.Ptr("PANRSID"), - }, - DNSSettings: &armpanngfw.DNSSettings{ - DNSServers: []*armpanngfw.IPAddress{ - { - Address: to.Ptr("20.22.92.111"), - ResourceID: to.Ptr("/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-egressNatIp1"), - }}, - EnableDNSProxy: to.Ptr(armpanngfw.DNSProxyDISABLED), - EnabledDNSType: to.Ptr(armpanngfw.EnabledDNSTypeCUSTOM), - }, - FrontEndSettings: []*armpanngfw.FrontendSetting{ - { - Name: to.Ptr("frontendsetting11"), - BackendConfiguration: &armpanngfw.EndpointConfiguration{ - Address: &armpanngfw.IPAddress{ - Address: to.Ptr("20.22.32.136"), - ResourceID: to.Ptr("/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-frontendSettingIp2"), - }, - Port: to.Ptr("80"), - }, - FrontendConfiguration: &armpanngfw.EndpointConfiguration{ - Address: &armpanngfw.IPAddress{ - Address: to.Ptr("20.22.91.251"), - ResourceID: to.Ptr("/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-frontendSettingIp1"), - }, - Port: to.Ptr("80"), - }, - Protocol: to.Ptr(armpanngfw.ProtocolTypeTCP), - }}, - IsPanoramaManaged: to.Ptr(armpanngfw.BooleanEnumTRUE), - MarketplaceDetails: &armpanngfw.MarketplaceDetails{ - MarketplaceSubscriptionStatus: to.Ptr(armpanngfw.MarketplaceSubscriptionStatusPendingFulfillmentStart), - OfferID: to.Ptr("liftr-pan-ame-test"), - PublisherID: to.Ptr("isvtestuklegacy"), - }, - NetworkProfile: &armpanngfw.NetworkProfile{ - EgressNatIP: []*armpanngfw.IPAddress{ - { - Address: to.Ptr("20.22.92.111"), - ResourceID: to.Ptr("/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-egressNatIp1"), - }}, - EnableEgressNat: to.Ptr(armpanngfw.EgressNatENABLED), - NetworkType: to.Ptr(armpanngfw.NetworkTypeVNET), - PublicIPs: []*armpanngfw.IPAddress{ - { - Address: to.Ptr("20.22.92.11"), - ResourceID: to.Ptr("/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-PublicIp1"), - }}, - VnetConfiguration: &armpanngfw.VnetConfiguration{ - IPOfTrustSubnetForUdr: &armpanngfw.IPAddress{ - Address: to.Ptr("10.1.1.0/24"), - ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet"), - }, - TrustSubnet: &armpanngfw.IPAddressSpace{ - AddressSpace: to.Ptr("10.1.1.0/24"), - ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-trust-subnet"), - }, - UnTrustSubnet: &armpanngfw.IPAddressSpace{ - AddressSpace: to.Ptr("10.1.1.0/24"), - ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet"), - }, - Vnet: &armpanngfw.IPAddressSpace{ - AddressSpace: to.Ptr("10.1.0.0/16"), - ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet"), - }, - }, - VwanConfiguration: &armpanngfw.VwanConfiguration{ - IPOfTrustSubnetForUdr: &armpanngfw.IPAddress{ - Address: to.Ptr("10.1.1.0/24"), - ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet"), - }, - NetworkVirtualApplianceID: to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c12"), - TrustSubnet: &armpanngfw.IPAddressSpace{ - AddressSpace: to.Ptr("10.1.1.0/24"), - ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-trust-subnet"), - }, - UnTrustSubnet: &armpanngfw.IPAddressSpace{ - AddressSpace: to.Ptr("10.1.1.0/24"), - ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet"), - }, - VHub: &armpanngfw.IPAddressSpace{ - AddressSpace: to.Ptr("10.1.1.0/24"), - ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet"), - }, - }, - }, - PanEtag: to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c12"), - PanoramaConfig: &armpanngfw.PanoramaConfig{ - ConfigString: to.Ptr("bas64EncodedString"), - }, - PlanData: &armpanngfw.PlanData{ - BillingCycle: to.Ptr(armpanngfw.BillingCycleMONTHLY), - PlanID: to.Ptr("liftrpantestplan"), - UsageType: to.Ptr(armpanngfw.UsageTypePAYG), - }, - ProvisioningState: to.Ptr(armpanngfw.ProvisioningStateAccepted), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.FirewallResource = armpanngfw.FirewallResource{ - // Name: to.Ptr("armid1"), - // Type: to.Ptr("firewalls"), - // ID: to.Ptr("/providers/PaloAltoNetworks.Cloudngfw/globalrulestacks/armid1/firewalls/armid1"), - // SystemData: &armpanngfw.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // CreatedBy: to.Ptr("praval"), - // CreatedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // LastModifiedBy: to.Ptr("praval"), - // LastModifiedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // }, - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "tagName": to.Ptr("value"), - // }, - // Identity: &armpanngfw.AzureResourceManagerManagedIdentityProperties{ - // Type: to.Ptr(armpanngfw.ManagedIdentityTypeNone), - // PrincipalID: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaa"), - // TenantID: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // UserAssignedIdentities: map[string]*armpanngfw.AzureResourceManagerUserAssignedIdentity{ - // "key16": &armpanngfw.AzureResourceManagerUserAssignedIdentity{ - // ClientID: to.Ptr("aaaa"), - // PrincipalID: to.Ptr("aaaaaaaaaaaaaaa"), - // }, - // }, - // }, - // Properties: &armpanngfw.FirewallDeploymentProperties{ - // AssociatedRulestack: &armpanngfw.RulestackDetails{ - // Location: to.Ptr("eastus"), - // ResourceID: to.Ptr("aaaaaaaaaa"), - // RulestackID: to.Ptr("aaaaaaaaaaaaaaaa"), - // }, - // DNSSettings: &armpanngfw.DNSSettings{ - // DNSServers: []*armpanngfw.IPAddress{ - // { - // Address: to.Ptr("20.22.92.111"), - // ResourceID: to.Ptr("/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-egressNatIp1"), - // }}, - // EnableDNSProxy: to.Ptr(armpanngfw.DNSProxyDISABLED), - // EnabledDNSType: to.Ptr(armpanngfw.EnabledDNSTypeCUSTOM), - // }, - // FrontEndSettings: []*armpanngfw.FrontendSetting{ - // { - // Name: to.Ptr("frontendsetting11"), - // BackendConfiguration: &armpanngfw.EndpointConfiguration{ - // Address: &armpanngfw.IPAddress{ - // Address: to.Ptr("20.22.32.136"), - // ResourceID: to.Ptr("/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-frontendSettingIp2"), - // }, - // Port: to.Ptr("80"), - // }, - // FrontendConfiguration: &armpanngfw.EndpointConfiguration{ - // Address: &armpanngfw.IPAddress{ - // Address: to.Ptr("20.22.91.251"), - // ResourceID: to.Ptr("/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-frontendSettingIp1"), - // }, - // Port: to.Ptr("80"), - // }, - // Protocol: to.Ptr(armpanngfw.ProtocolTypeTCP), - // }}, - // IsPanoramaManaged: to.Ptr(armpanngfw.BooleanEnumTRUE), - // MarketplaceDetails: &armpanngfw.MarketplaceDetails{ - // MarketplaceSubscriptionID: to.Ptr("aa"), - // MarketplaceSubscriptionStatus: to.Ptr(armpanngfw.MarketplaceSubscriptionStatusPendingFulfillmentStart), - // OfferID: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // PublisherID: to.Ptr("aaaa"), - // }, - // NetworkProfile: &armpanngfw.NetworkProfile{ - // EgressNatIP: []*armpanngfw.IPAddress{ - // { - // Address: to.Ptr("20.22.92.111"), - // ResourceID: to.Ptr("/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-egressNatIp1"), - // }}, - // EnableEgressNat: to.Ptr(armpanngfw.EgressNatENABLED), - // NetworkType: to.Ptr(armpanngfw.NetworkTypeVNET), - // PublicIPs: []*armpanngfw.IPAddress{ - // { - // Address: to.Ptr("20.22.92.11"), - // ResourceID: to.Ptr("/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-PublicIp1"), - // }}, - // VnetConfiguration: &armpanngfw.VnetConfiguration{ - // IPOfTrustSubnetForUdr: &armpanngfw.IPAddress{ - // Address: to.Ptr("10.1.1.0/24"), - // ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet"), - // }, - // TrustSubnet: &armpanngfw.IPAddressSpace{ - // AddressSpace: to.Ptr("10.1.1.0/24"), - // ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-trust-subnet"), - // }, - // UnTrustSubnet: &armpanngfw.IPAddressSpace{ - // AddressSpace: to.Ptr("10.1.1.0/24"), - // ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet"), - // }, - // Vnet: &armpanngfw.IPAddressSpace{ - // AddressSpace: to.Ptr("10.1.0.0/16"), - // ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet"), - // }, - // }, - // VwanConfiguration: &armpanngfw.VwanConfiguration{ - // IPOfTrustSubnetForUdr: &armpanngfw.IPAddress{ - // Address: to.Ptr("10.1.1.0/24"), - // ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet"), - // }, - // NetworkVirtualApplianceID: to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c12"), - // TrustSubnet: &armpanngfw.IPAddressSpace{ - // AddressSpace: to.Ptr("10.1.1.0/24"), - // ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-trust-subnet"), - // }, - // UnTrustSubnet: &armpanngfw.IPAddressSpace{ - // AddressSpace: to.Ptr("10.1.1.0/24"), - // ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet"), - // }, - // VHub: &armpanngfw.IPAddressSpace{ - // AddressSpace: to.Ptr("10.1.1.0/24"), - // ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet"), - // }, - // }, - // }, - // PanEtag: to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c12"), - // PanoramaConfig: &armpanngfw.PanoramaConfig{ - // CgName: to.Ptr("PanoramaCollectorGroup"), - // ConfigString: to.Ptr("bas64EncodedString"), - // DgName: to.Ptr("PanoramaDeviceGroup"), - // HostName: to.Ptr("hostname"), - // PanoramaServer: to.Ptr("10.25.1.1"), - // PanoramaServer2: to.Ptr("10.20.1.1"), - // TplName: to.Ptr("PanoramaTemplateStack"), - // VMAuthKey: to.Ptr("SSH_AUTH_KEY"), - // }, - // PlanData: &armpanngfw.PlanData{ - // BillingCycle: to.Ptr(armpanngfw.BillingCycleWEEKLY), - // EffectiveDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-13T00:46:05.283Z"); return t}()), - // PlanID: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // UsageType: to.Ptr(armpanngfw.UsageTypePAYG), - // }, - // ProvisioningState: to.Ptr(armpanngfw.ProvisioningStateSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_CreateOrUpdate_MinimumSet_Gen.json -func ExampleFirewallsClient_BeginCreateOrUpdate_firewallsCreateOrUpdateMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewFirewallsClient().BeginCreateOrUpdate(ctx, "firewall-rg", "firewall1", armpanngfw.FirewallResource{ - Location: to.Ptr("eastus"), - Properties: &armpanngfw.FirewallDeploymentProperties{ - DNSSettings: &armpanngfw.DNSSettings{}, - MarketplaceDetails: &armpanngfw.MarketplaceDetails{ - OfferID: to.Ptr("liftr-pan-ame-test"), - PublisherID: to.Ptr("isvtestuklegacy"), - }, - NetworkProfile: &armpanngfw.NetworkProfile{ - EnableEgressNat: to.Ptr(armpanngfw.EgressNatENABLED), - NetworkType: to.Ptr(armpanngfw.NetworkTypeVNET), - PublicIPs: []*armpanngfw.IPAddress{ - { - Address: to.Ptr("20.22.92.11"), - ResourceID: to.Ptr("/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-PublicIp1"), - }}, - }, - PlanData: &armpanngfw.PlanData{ - BillingCycle: to.Ptr(armpanngfw.BillingCycleMONTHLY), - PlanID: to.Ptr("liftrpantestplan"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.FirewallResource = armpanngfw.FirewallResource{ - // ID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourcegroups/firewall-rg/providers/PaloAltoNetworks.Cloudngfw/firewalls/firewall1"), - // Location: to.Ptr("eastus"), - // Properties: &armpanngfw.FirewallDeploymentProperties{ - // DNSSettings: &armpanngfw.DNSSettings{ - // }, - // MarketplaceDetails: &armpanngfw.MarketplaceDetails{ - // OfferID: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // PublisherID: to.Ptr("aaaa"), - // }, - // NetworkProfile: &armpanngfw.NetworkProfile{ - // EnableEgressNat: to.Ptr(armpanngfw.EgressNatENABLED), - // NetworkType: to.Ptr(armpanngfw.NetworkTypeVNET), - // PublicIPs: []*armpanngfw.IPAddress{ - // { - // Address: to.Ptr("20.22.92.11"), - // ResourceID: to.Ptr("/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-PublicIp1"), - // }}, - // }, - // PlanData: &armpanngfw.PlanData{ - // BillingCycle: to.Ptr(armpanngfw.BillingCycleWEEKLY), - // PlanID: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_Update_MaximumSet_Gen.json -func ExampleFirewallsClient_Update_firewallsUpdateMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewFirewallsClient().Update(ctx, "firewall-rg", "firewall1", armpanngfw.FirewallResourceUpdate{ - Identity: &armpanngfw.AzureResourceManagerManagedIdentityProperties{ - Type: to.Ptr(armpanngfw.ManagedIdentityTypeNone), - UserAssignedIdentities: map[string]*armpanngfw.AzureResourceManagerUserAssignedIdentity{ - "key16": { - ClientID: to.Ptr("aaaa"), - PrincipalID: to.Ptr("aaaaaaaaaaaaaaa"), - }, - }, - }, - Properties: &armpanngfw.FirewallResourceUpdateProperties{ - AssociatedRulestack: &armpanngfw.RulestackDetails{ - Location: to.Ptr("eastus"), - ResourceID: to.Ptr("aaaaaaaaaa"), - RulestackID: to.Ptr("aaaaaaaaaaaaaaaa"), - }, - DNSSettings: &armpanngfw.DNSSettings{ - DNSServers: []*armpanngfw.IPAddress{ - { - Address: to.Ptr("20.22.92.111"), - ResourceID: to.Ptr("/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-egressNatIp1"), - }}, - EnableDNSProxy: to.Ptr(armpanngfw.DNSProxyDISABLED), - EnabledDNSType: to.Ptr(armpanngfw.EnabledDNSTypeCUSTOM), - }, - FrontEndSettings: []*armpanngfw.FrontendSetting{ - { - Name: to.Ptr("frontendsetting11"), - BackendConfiguration: &armpanngfw.EndpointConfiguration{ - Address: &armpanngfw.IPAddress{ - Address: to.Ptr("20.22.32.136"), - ResourceID: to.Ptr("/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-frontendSettingIp2"), - }, - Port: to.Ptr("80"), - }, - FrontendConfiguration: &armpanngfw.EndpointConfiguration{ - Address: &armpanngfw.IPAddress{ - Address: to.Ptr("20.22.91.251"), - ResourceID: to.Ptr("/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-frontendSettingIp1"), - }, - Port: to.Ptr("80"), - }, - Protocol: to.Ptr(armpanngfw.ProtocolTypeTCP), - }}, - IsPanoramaManaged: to.Ptr(armpanngfw.BooleanEnumTRUE), - MarketplaceDetails: &armpanngfw.MarketplaceDetails{ - MarketplaceSubscriptionStatus: to.Ptr(armpanngfw.MarketplaceSubscriptionStatusPendingFulfillmentStart), - OfferID: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - PublisherID: to.Ptr("aaaa"), - }, - NetworkProfile: &armpanngfw.NetworkProfile{ - EgressNatIP: []*armpanngfw.IPAddress{ - { - Address: to.Ptr("20.22.92.111"), - ResourceID: to.Ptr("/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-egressNatIp1"), - }}, - EnableEgressNat: to.Ptr(armpanngfw.EgressNatENABLED), - NetworkType: to.Ptr(armpanngfw.NetworkTypeVNET), - PublicIPs: []*armpanngfw.IPAddress{ - { - Address: to.Ptr("20.22.92.11"), - ResourceID: to.Ptr("/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-PublicIp1"), - }}, - VnetConfiguration: &armpanngfw.VnetConfiguration{ - IPOfTrustSubnetForUdr: &armpanngfw.IPAddress{ - Address: to.Ptr("10.1.1.0/24"), - ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet"), - }, - TrustSubnet: &armpanngfw.IPAddressSpace{ - AddressSpace: to.Ptr("10.1.1.0/24"), - ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-trust-subnet"), - }, - UnTrustSubnet: &armpanngfw.IPAddressSpace{ - AddressSpace: to.Ptr("10.1.1.0/24"), - ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet"), - }, - Vnet: &armpanngfw.IPAddressSpace{ - AddressSpace: to.Ptr("10.1.0.0/16"), - ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet"), - }, - }, - VwanConfiguration: &armpanngfw.VwanConfiguration{ - IPOfTrustSubnetForUdr: &armpanngfw.IPAddress{ - Address: to.Ptr("10.1.1.0/24"), - ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet"), - }, - NetworkVirtualApplianceID: to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c12"), - TrustSubnet: &armpanngfw.IPAddressSpace{ - AddressSpace: to.Ptr("10.1.1.0/24"), - ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-trust-subnet"), - }, - UnTrustSubnet: &armpanngfw.IPAddressSpace{ - AddressSpace: to.Ptr("10.1.1.0/24"), - ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet"), - }, - VHub: &armpanngfw.IPAddressSpace{ - AddressSpace: to.Ptr("10.1.1.0/24"), - ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet"), - }, - }, - }, - PanEtag: to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c12"), - PanoramaConfig: &armpanngfw.PanoramaConfig{ - ConfigString: to.Ptr("bas64EncodedString"), - }, - PlanData: &armpanngfw.PlanData{ - BillingCycle: to.Ptr(armpanngfw.BillingCycleWEEKLY), - PlanID: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - UsageType: to.Ptr(armpanngfw.UsageTypePAYG), - }, - }, - Tags: map[string]*string{ - "tagName": to.Ptr("value"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.FirewallResource = armpanngfw.FirewallResource{ - // Name: to.Ptr("aaaaaaaaaaaaa"), - // Type: to.Ptr("aaaaaa"), - // ID: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaa"), - // SystemData: &armpanngfw.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // CreatedBy: to.Ptr("praval"), - // CreatedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // LastModifiedBy: to.Ptr("praval"), - // LastModifiedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // }, - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "tagName": to.Ptr("value"), - // }, - // Identity: &armpanngfw.AzureResourceManagerManagedIdentityProperties{ - // Type: to.Ptr(armpanngfw.ManagedIdentityTypeNone), - // PrincipalID: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaa"), - // TenantID: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // UserAssignedIdentities: map[string]*armpanngfw.AzureResourceManagerUserAssignedIdentity{ - // "key16": &armpanngfw.AzureResourceManagerUserAssignedIdentity{ - // ClientID: to.Ptr("aaaa"), - // PrincipalID: to.Ptr("aaaaaaaaaaaaaaa"), - // }, - // }, - // }, - // Properties: &armpanngfw.FirewallDeploymentProperties{ - // AssociatedRulestack: &armpanngfw.RulestackDetails{ - // Location: to.Ptr("eastus"), - // ResourceID: to.Ptr("aaaaaaaaaa"), - // RulestackID: to.Ptr("aaaaaaaaaaaaaaaa"), - // }, - // DNSSettings: &armpanngfw.DNSSettings{ - // DNSServers: []*armpanngfw.IPAddress{ - // { - // Address: to.Ptr("20.22.92.111"), - // ResourceID: to.Ptr("/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-egressNatIp1"), - // }}, - // EnableDNSProxy: to.Ptr(armpanngfw.DNSProxyDISABLED), - // EnabledDNSType: to.Ptr(armpanngfw.EnabledDNSTypeCUSTOM), - // }, - // FrontEndSettings: []*armpanngfw.FrontendSetting{ - // { - // Name: to.Ptr("frontendsetting11"), - // BackendConfiguration: &armpanngfw.EndpointConfiguration{ - // Address: &armpanngfw.IPAddress{ - // Address: to.Ptr("20.22.32.136"), - // ResourceID: to.Ptr("/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-frontendSettingIp2"), - // }, - // Port: to.Ptr("80"), - // }, - // FrontendConfiguration: &armpanngfw.EndpointConfiguration{ - // Address: &armpanngfw.IPAddress{ - // Address: to.Ptr("20.22.91.251"), - // ResourceID: to.Ptr("/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-frontendSettingIp1"), - // }, - // Port: to.Ptr("80"), - // }, - // Protocol: to.Ptr(armpanngfw.ProtocolTypeTCP), - // }}, - // IsPanoramaManaged: to.Ptr(armpanngfw.BooleanEnumTRUE), - // MarketplaceDetails: &armpanngfw.MarketplaceDetails{ - // MarketplaceSubscriptionID: to.Ptr("aa"), - // MarketplaceSubscriptionStatus: to.Ptr(armpanngfw.MarketplaceSubscriptionStatusPendingFulfillmentStart), - // OfferID: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // PublisherID: to.Ptr("aaaa"), - // }, - // NetworkProfile: &armpanngfw.NetworkProfile{ - // EgressNatIP: []*armpanngfw.IPAddress{ - // { - // Address: to.Ptr("20.22.92.111"), - // ResourceID: to.Ptr("/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-egressNatIp1"), - // }}, - // EnableEgressNat: to.Ptr(armpanngfw.EgressNatENABLED), - // NetworkType: to.Ptr(armpanngfw.NetworkTypeVNET), - // PublicIPs: []*armpanngfw.IPAddress{ - // { - // Address: to.Ptr("20.22.92.11"), - // ResourceID: to.Ptr("/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-PublicIp1"), - // }}, - // VnetConfiguration: &armpanngfw.VnetConfiguration{ - // IPOfTrustSubnetForUdr: &armpanngfw.IPAddress{ - // Address: to.Ptr("10.1.1.0/24"), - // ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet"), - // }, - // TrustSubnet: &armpanngfw.IPAddressSpace{ - // AddressSpace: to.Ptr("10.1.1.0/24"), - // ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-trust-subnet"), - // }, - // UnTrustSubnet: &armpanngfw.IPAddressSpace{ - // AddressSpace: to.Ptr("10.1.1.0/24"), - // ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet"), - // }, - // Vnet: &armpanngfw.IPAddressSpace{ - // AddressSpace: to.Ptr("10.1.0.0/16"), - // ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet"), - // }, - // }, - // VwanConfiguration: &armpanngfw.VwanConfiguration{ - // IPOfTrustSubnetForUdr: &armpanngfw.IPAddress{ - // Address: to.Ptr("10.1.1.0/24"), - // ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet"), - // }, - // NetworkVirtualApplianceID: to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c12"), - // TrustSubnet: &armpanngfw.IPAddressSpace{ - // AddressSpace: to.Ptr("10.1.1.0/24"), - // ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-trust-subnet"), - // }, - // UnTrustSubnet: &armpanngfw.IPAddressSpace{ - // AddressSpace: to.Ptr("10.1.1.0/24"), - // ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet"), - // }, - // VHub: &armpanngfw.IPAddressSpace{ - // AddressSpace: to.Ptr("10.1.1.0/24"), - // ResourceID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/os-liftr-integration/providers/Microsoft.Network/virtualNetworks/os-liftr-integration-vnet/subnets/os-liftr-integration-untrust-subnet"), - // }, - // }, - // }, - // PanEtag: to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c12"), - // PanoramaConfig: &armpanngfw.PanoramaConfig{ - // CgName: to.Ptr("PanoramaCollectorGroup"), - // ConfigString: to.Ptr("bas64EncodedString"), - // DgName: to.Ptr("PanoramaDeviceGroup"), - // HostName: to.Ptr("hostname"), - // PanoramaServer: to.Ptr("10.25.1.1"), - // PanoramaServer2: to.Ptr("10.20.1.1"), - // TplName: to.Ptr("PanoramaTemplateStack"), - // VMAuthKey: to.Ptr("SSH_AUTH_KEY"), - // }, - // PlanData: &armpanngfw.PlanData{ - // BillingCycle: to.Ptr(armpanngfw.BillingCycleWEEKLY), - // EffectiveDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-13T00:46:05.283Z"); return t}()), - // PlanID: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // UsageType: to.Ptr(armpanngfw.UsageTypePAYG), - // }, - // ProvisioningState: to.Ptr(armpanngfw.ProvisioningStateSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_Update_MinimumSet_Gen.json -func ExampleFirewallsClient_Update_firewallsUpdateMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewFirewallsClient().Update(ctx, "firewall-rg", "firewall1", armpanngfw.FirewallResourceUpdate{}, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.FirewallResource = armpanngfw.FirewallResource{ - // Location: to.Ptr("eastus"), - // Properties: &armpanngfw.FirewallDeploymentProperties{ - // DNSSettings: &armpanngfw.DNSSettings{ - // }, - // MarketplaceDetails: &armpanngfw.MarketplaceDetails{ - // OfferID: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // PublisherID: to.Ptr("aaaa"), - // }, - // NetworkProfile: &armpanngfw.NetworkProfile{ - // EnableEgressNat: to.Ptr(armpanngfw.EgressNatENABLED), - // NetworkType: to.Ptr(armpanngfw.NetworkTypeVNET), - // PublicIPs: []*armpanngfw.IPAddress{ - // { - // Address: to.Ptr("20.22.92.11"), - // ResourceID: to.Ptr("/subscriptions/01c7d41f-afaf-464e-8a8b-5c6f9f98cee8/resourceGroups/mj-liftr-integration/providers/Microsoft.Network/publicIPAddresses/mj-liftr-integration-PublicIp1"), - // }}, - // }, - // PlanData: &armpanngfw.PlanData{ - // BillingCycle: to.Ptr(armpanngfw.BillingCycleWEEKLY), - // PlanID: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_Delete_MaximumSet_Gen.json -func ExampleFirewallsClient_BeginDelete_firewallsDeleteMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewFirewallsClient().BeginDelete(ctx, "firewall-rg", "firewall1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_Delete_MinimumSet_Gen.json -func ExampleFirewallsClient_BeginDelete_firewallsDeleteMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewFirewallsClient().BeginDelete(ctx, "firewall-rg", "firewall1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_getGlobalRulestack_MaximumSet_Gen.json -func ExampleFirewallsClient_GetGlobalRulestack_firewallsGetGlobalRulestackMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewFirewallsClient().GetGlobalRulestack(ctx, "firewall-rg", "firewall1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.GlobalRulestackInfo = armpanngfw.GlobalRulestackInfo{ - // AzureID: to.Ptr("aaaaaaaaaa"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_getGlobalRulestack_MinimumSet_Gen.json -func ExampleFirewallsClient_GetGlobalRulestack_firewallsGetGlobalRulestackMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewFirewallsClient().GetGlobalRulestack(ctx, "firewall-rg", "firewall1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.GlobalRulestackInfo = armpanngfw.GlobalRulestackInfo{ - // AzureID: to.Ptr("aaaaaaaaaa"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_getLogProfile_MaximumSet_Gen.json -func ExampleFirewallsClient_GetLogProfile_firewallsGetLogProfileMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewFirewallsClient().GetLogProfile(ctx, "firewall-rg", "firewall1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.LogSettings = armpanngfw.LogSettings{ - // ApplicationInsights: &armpanngfw.ApplicationInsights{ - // ID: to.Ptr("aaaaaaaaaaaaaaaa"), - // Key: to.Ptr("aaaaaaaaaaaaa"), - // }, - // CommonDestination: &armpanngfw.LogDestination{ - // EventHubConfigurations: &armpanngfw.EventHub{ - // Name: to.Ptr("aaaaaaaa"), - // ID: to.Ptr("aaaaaaaaaa"), - // NameSpace: to.Ptr("aaaaaaaaaaaaaaaaaaaaa"), - // PolicyName: to.Ptr("aaaaaaaaaaaa"), - // SubscriptionID: to.Ptr("aaaaaaaaaa"), - // }, - // MonitorConfigurations: &armpanngfw.MonitorLog{ - // ID: to.Ptr("aaaaaaaaaaaaaaaaaaa"), - // PrimaryKey: to.Ptr("aaaaaaaaaaaaa"), - // SecondaryKey: to.Ptr("a"), - // SubscriptionID: to.Ptr("aaaaaaaaaaaaa"), - // Workspace: to.Ptr("aaaaaaaaaaa"), - // }, - // StorageConfigurations: &armpanngfw.StorageAccount{ - // AccountName: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaa"), - // ID: to.Ptr("aaaaaaaaaaaaaaa"), - // SubscriptionID: to.Ptr("aaaaaaaaa"), - // }, - // }, - // DecryptLogDestination: &armpanngfw.LogDestination{ - // EventHubConfigurations: &armpanngfw.EventHub{ - // Name: to.Ptr("aaaaaaaa"), - // ID: to.Ptr("aaaaaaaaaa"), - // NameSpace: to.Ptr("aaaaaaaaaaaaaaaaaaaaa"), - // PolicyName: to.Ptr("aaaaaaaaaaaa"), - // SubscriptionID: to.Ptr("aaaaaaaaaa"), - // }, - // MonitorConfigurations: &armpanngfw.MonitorLog{ - // ID: to.Ptr("aaaaaaaaaaaaaaaaaaa"), - // PrimaryKey: to.Ptr("aaaaaaaaaaaaa"), - // SecondaryKey: to.Ptr("a"), - // SubscriptionID: to.Ptr("aaaaaaaaaaaaa"), - // Workspace: to.Ptr("aaaaaaaaaaa"), - // }, - // StorageConfigurations: &armpanngfw.StorageAccount{ - // AccountName: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaa"), - // ID: to.Ptr("aaaaaaaaaaaaaaa"), - // SubscriptionID: to.Ptr("aaaaaaaaa"), - // }, - // }, - // LogOption: to.Ptr(armpanngfw.LogOptionSAMEDESTINATION), - // LogType: to.Ptr(armpanngfw.LogTypeTRAFFIC), - // ThreatLogDestination: &armpanngfw.LogDestination{ - // EventHubConfigurations: &armpanngfw.EventHub{ - // Name: to.Ptr("aaaaaaaa"), - // ID: to.Ptr("aaaaaaaaaa"), - // NameSpace: to.Ptr("aaaaaaaaaaaaaaaaaaaaa"), - // PolicyName: to.Ptr("aaaaaaaaaaaa"), - // SubscriptionID: to.Ptr("aaaaaaaaaa"), - // }, - // MonitorConfigurations: &armpanngfw.MonitorLog{ - // ID: to.Ptr("aaaaaaaaaaaaaaaaaaa"), - // PrimaryKey: to.Ptr("aaaaaaaaaaaaa"), - // SecondaryKey: to.Ptr("a"), - // SubscriptionID: to.Ptr("aaaaaaaaaaaaa"), - // Workspace: to.Ptr("aaaaaaaaaaa"), - // }, - // StorageConfigurations: &armpanngfw.StorageAccount{ - // AccountName: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaa"), - // ID: to.Ptr("aaaaaaaaaaaaaaa"), - // SubscriptionID: to.Ptr("aaaaaaaaa"), - // }, - // }, - // TrafficLogDestination: &armpanngfw.LogDestination{ - // EventHubConfigurations: &armpanngfw.EventHub{ - // Name: to.Ptr("aaaaaaaa"), - // ID: to.Ptr("aaaaaaaaaa"), - // NameSpace: to.Ptr("aaaaaaaaaaaaaaaaaaaaa"), - // PolicyName: to.Ptr("aaaaaaaaaaaa"), - // SubscriptionID: to.Ptr("aaaaaaaaaa"), - // }, - // MonitorConfigurations: &armpanngfw.MonitorLog{ - // ID: to.Ptr("aaaaaaaaaaaaaaaaaaa"), - // PrimaryKey: to.Ptr("aaaaaaaaaaaaa"), - // SecondaryKey: to.Ptr("a"), - // SubscriptionID: to.Ptr("aaaaaaaaaaaaa"), - // Workspace: to.Ptr("aaaaaaaaaaa"), - // }, - // StorageConfigurations: &armpanngfw.StorageAccount{ - // AccountName: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaa"), - // ID: to.Ptr("aaaaaaaaaaaaaaa"), - // SubscriptionID: to.Ptr("aaaaaaaaa"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_getLogProfile_MinimumSet_Gen.json -func ExampleFirewallsClient_GetLogProfile_firewallsGetLogProfileMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewFirewallsClient().GetLogProfile(ctx, "firewall-rg", "firewall1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.LogSettings = armpanngfw.LogSettings{ - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_getSupportInfo_MaximumSet_Gen.json -func ExampleFirewallsClient_GetSupportInfo_firewallsGetSupportInfoMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewFirewallsClient().GetSupportInfo(ctx, "rgopenapi", "firewall1", &armpanngfw.FirewallsClientGetSupportInfoOptions{Email: to.Ptr("user1@domain.com")}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SupportInfo = armpanngfw.SupportInfo{ - // AccountID: to.Ptr("3cg5b439-294d-4c25-b0b2-ef649e0g6d38"), - // AccountRegistered: to.Ptr(armpanngfw.BooleanEnumTRUE), - // FreeTrial: to.Ptr(armpanngfw.BooleanEnumTRUE), - // FreeTrialCreditLeft: to.Ptr[int32](10), - // FreeTrialDaysLeft: to.Ptr[int32](1), - // HelpURL: to.Ptr("https://ssopreview.paloaltonetworks.com/home/bookmark/0oa4ao61shG4rd3Ub1d7/2557"), - // ProductSerial: to.Ptr("e22715cb-7e4e-4814-ad4f-ccd1417755d7"), - // ProductSKU: to.Ptr("62f63e3c-bc5a-4d68-a8a1-fcba9f526c90"), - // RegisterURL: to.Ptr("https://ssopreview.paloaltonetworks.com/home/bookmark/0oa4ao61shG4rd3Ub1d7/2557"), - // SupportURL: to.Ptr("https://ssopreview.paloaltonetworks.com/home/bookmark/0oa4ao61shG4rd3Ub1d7/2557"), - // UserDomainSupported: to.Ptr(armpanngfw.BooleanEnumTRUE), - // UserRegistered: to.Ptr(armpanngfw.BooleanEnumTRUE), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_getSupportInfo_MinimumSet_Gen.json -func ExampleFirewallsClient_GetSupportInfo_firewallsGetSupportInfoMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewFirewallsClient().GetSupportInfo(ctx, "rgopenapi", "firewall1", &armpanngfw.FirewallsClientGetSupportInfoOptions{Email: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SupportInfo = armpanngfw.SupportInfo{ - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_saveLogProfile_MaximumSet_Gen.json -func ExampleFirewallsClient_SaveLogProfile_firewallsSaveLogProfileMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewFirewallsClient().SaveLogProfile(ctx, "firewall-rg", "firewall1", &armpanngfw.FirewallsClientSaveLogProfileOptions{LogSettings: &armpanngfw.LogSettings{ - ApplicationInsights: &armpanngfw.ApplicationInsights{ - ID: to.Ptr("aaaaaaaaaaaaaaaa"), - Key: to.Ptr("aaaaaaaaaaaaa"), - }, - CommonDestination: &armpanngfw.LogDestination{ - EventHubConfigurations: &armpanngfw.EventHub{ - Name: to.Ptr("aaaaaaaa"), - ID: to.Ptr("aaaaaaaaaa"), - NameSpace: to.Ptr("aaaaaaaaaaaaaaaaaaaaa"), - PolicyName: to.Ptr("aaaaaaaaaaaa"), - SubscriptionID: to.Ptr("aaaaaaaaaa"), - }, - MonitorConfigurations: &armpanngfw.MonitorLog{ - ID: to.Ptr("aaaaaaaaaaaaaaaaaaa"), - PrimaryKey: to.Ptr("aaaaaaaaaaaaa"), - SecondaryKey: to.Ptr("a"), - SubscriptionID: to.Ptr("aaaaaaaaaaaaa"), - Workspace: to.Ptr("aaaaaaaaaaa"), - }, - StorageConfigurations: &armpanngfw.StorageAccount{ - AccountName: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaa"), - ID: to.Ptr("aaaaaaaaaaaaaaa"), - SubscriptionID: to.Ptr("aaaaaaaaa"), - }, - }, - DecryptLogDestination: &armpanngfw.LogDestination{ - EventHubConfigurations: &armpanngfw.EventHub{ - Name: to.Ptr("aaaaaaaa"), - ID: to.Ptr("aaaaaaaaaa"), - NameSpace: to.Ptr("aaaaaaaaaaaaaaaaaaaaa"), - PolicyName: to.Ptr("aaaaaaaaaaaa"), - SubscriptionID: to.Ptr("aaaaaaaaaa"), - }, - MonitorConfigurations: &armpanngfw.MonitorLog{ - ID: to.Ptr("aaaaaaaaaaaaaaaaaaa"), - PrimaryKey: to.Ptr("aaaaaaaaaaaaa"), - SecondaryKey: to.Ptr("a"), - SubscriptionID: to.Ptr("aaaaaaaaaaaaa"), - Workspace: to.Ptr("aaaaaaaaaaa"), - }, - StorageConfigurations: &armpanngfw.StorageAccount{ - AccountName: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaa"), - ID: to.Ptr("aaaaaaaaaaaaaaa"), - SubscriptionID: to.Ptr("aaaaaaaaa"), - }, - }, - LogOption: to.Ptr(armpanngfw.LogOptionSAMEDESTINATION), - LogType: to.Ptr(armpanngfw.LogTypeTRAFFIC), - ThreatLogDestination: &armpanngfw.LogDestination{ - EventHubConfigurations: &armpanngfw.EventHub{ - Name: to.Ptr("aaaaaaaa"), - ID: to.Ptr("aaaaaaaaaa"), - NameSpace: to.Ptr("aaaaaaaaaaaaaaaaaaaaa"), - PolicyName: to.Ptr("aaaaaaaaaaaa"), - SubscriptionID: to.Ptr("aaaaaaaaaa"), - }, - MonitorConfigurations: &armpanngfw.MonitorLog{ - ID: to.Ptr("aaaaaaaaaaaaaaaaaaa"), - PrimaryKey: to.Ptr("aaaaaaaaaaaaa"), - SecondaryKey: to.Ptr("a"), - SubscriptionID: to.Ptr("aaaaaaaaaaaaa"), - Workspace: to.Ptr("aaaaaaaaaaa"), - }, - StorageConfigurations: &armpanngfw.StorageAccount{ - AccountName: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaa"), - ID: to.Ptr("aaaaaaaaaaaaaaa"), - SubscriptionID: to.Ptr("aaaaaaaaa"), - }, - }, - TrafficLogDestination: &armpanngfw.LogDestination{ - EventHubConfigurations: &armpanngfw.EventHub{ - Name: to.Ptr("aaaaaaaa"), - ID: to.Ptr("aaaaaaaaaa"), - NameSpace: to.Ptr("aaaaaaaaaaaaaaaaaaaaa"), - PolicyName: to.Ptr("aaaaaaaaaaaa"), - SubscriptionID: to.Ptr("aaaaaaaaaa"), - }, - MonitorConfigurations: &armpanngfw.MonitorLog{ - ID: to.Ptr("aaaaaaaaaaaaaaaaaaa"), - PrimaryKey: to.Ptr("aaaaaaaaaaaaa"), - SecondaryKey: to.Ptr("a"), - SubscriptionID: to.Ptr("aaaaaaaaaaaaa"), - Workspace: to.Ptr("aaaaaaaaaaa"), - }, - StorageConfigurations: &armpanngfw.StorageAccount{ - AccountName: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaa"), - ID: to.Ptr("aaaaaaaaaaaaaaa"), - SubscriptionID: to.Ptr("aaaaaaaaa"), - }, - }, - }, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Firewalls_saveLogProfile_MinimumSet_Gen.json -func ExampleFirewallsClient_SaveLogProfile_firewallsSaveLogProfileMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewFirewallsClient().SaveLogProfile(ctx, "firewall-rg", "firewall1", &armpanngfw.FirewallsClientSaveLogProfileOptions{LogSettings: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/firewallstatus_client_example_test.go b/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/firewallstatus_client_example_test.go deleted file mode 100644 index 160373e157f3..000000000000 --- a/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/firewallstatus_client_example_test.go +++ /dev/null @@ -1,170 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// 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. -// DO NOT EDIT. - -package armpanngfw_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FirewallStatus_ListByFirewalls_MaximumSet_Gen.json -func ExampleFirewallStatusClient_NewListByFirewallsPager_firewallStatusListByFirewallsMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewFirewallStatusClient().NewListByFirewallsPager("rgopenapi", "firewall1", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.FirewallStatusResourceListResult = armpanngfw.FirewallStatusResourceListResult{ - // Value: []*armpanngfw.FirewallStatusResource{ - // { - // Name: to.Ptr("default"), - // Type: to.Ptr("aaaaaaa"), - // ID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourcegroups/firewall-rg/providers/PaloAltoNetworks.Cloudngfw/firewalls/firewall1/statuses/default"), - // SystemData: &armpanngfw.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // CreatedBy: to.Ptr("praval"), - // CreatedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // LastModifiedBy: to.Ptr("praval"), - // LastModifiedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // }, - // Properties: &armpanngfw.FirewallStatusProperty{ - // HealthReason: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // HealthStatus: to.Ptr(armpanngfw.HealthStatusGREEN), - // IsPanoramaManaged: to.Ptr(armpanngfw.BooleanEnumTRUE), - // PanoramaStatus: &armpanngfw.PanoramaStatus{ - // PanoramaServer2Status: to.Ptr(armpanngfw.ServerStatusUP), - // PanoramaServerStatus: to.Ptr(armpanngfw.ServerStatusUP), - // }, - // ProvisioningState: to.Ptr(armpanngfw.ReadOnlyProvisioningStateSucceeded), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FirewallStatus_ListByFirewalls_MinimumSet_Gen.json -func ExampleFirewallStatusClient_NewListByFirewallsPager_firewallStatusListByFirewallsMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewFirewallStatusClient().NewListByFirewallsPager("rgopenapi", "firewall1", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.FirewallStatusResourceListResult = armpanngfw.FirewallStatusResourceListResult{ - // Value: []*armpanngfw.FirewallStatusResource{ - // { - // ID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourcegroups/firewall-rg/providers/PaloAltoNetworks.Cloudngfw/firewalls/firewall1/statuses/default"), - // Properties: &armpanngfw.FirewallStatusProperty{ - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FirewallStatus_Get_MaximumSet_Gen.json -func ExampleFirewallStatusClient_Get_firewallStatusGetMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewFirewallStatusClient().Get(ctx, "rgopenapi", "firewall1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.FirewallStatusResource = armpanngfw.FirewallStatusResource{ - // Name: to.Ptr("default"), - // Type: to.Ptr("aaaa"), - // ID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourcegroups/firewall-rg/providers/PaloAltoNetworks.Cloudngfw/firewalls/firewall1/statuses/default"), - // SystemData: &armpanngfw.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // CreatedBy: to.Ptr("praval"), - // CreatedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // LastModifiedBy: to.Ptr("praval"), - // LastModifiedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // }, - // Properties: &armpanngfw.FirewallStatusProperty{ - // HealthReason: to.Ptr("aaaaaaaaaaaa"), - // HealthStatus: to.Ptr(armpanngfw.HealthStatusGREEN), - // IsPanoramaManaged: to.Ptr(armpanngfw.BooleanEnumTRUE), - // PanoramaStatus: &armpanngfw.PanoramaStatus{ - // PanoramaServer2Status: to.Ptr(armpanngfw.ServerStatusUP), - // PanoramaServerStatus: to.Ptr(armpanngfw.ServerStatusUP), - // }, - // ProvisioningState: to.Ptr(armpanngfw.ReadOnlyProvisioningStateSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FirewallStatus_Get_MinimumSet_Gen.json -func ExampleFirewallStatusClient_Get_firewallStatusGetMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewFirewallStatusClient().Get(ctx, "rgopenapi", "firewall1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.FirewallStatusResource = armpanngfw.FirewallStatusResource{ - // ID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourcegroups/firewall-rg/providers/PaloAltoNetworks.Cloudngfw/firewalls/firewall1/statuses/default"), - // Properties: &armpanngfw.FirewallStatusProperty{ - // }, - // } -} diff --git a/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/fqdnlistglobalrulestack_client_example_test.go b/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/fqdnlistglobalrulestack_client_example_test.go deleted file mode 100644 index dc9f95dc39a1..000000000000 --- a/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/fqdnlistglobalrulestack_client_example_test.go +++ /dev/null @@ -1,311 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// 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. -// DO NOT EDIT. - -package armpanngfw_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FqdnListGlobalRulestack_List_MaximumSet_Gen.json -func ExampleFqdnListGlobalRulestackClient_NewListPager_fqdnListGlobalRulestackListMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewFqdnListGlobalRulestackClient().NewListPager("praval", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.FqdnListGlobalRulestackResourceListResult = armpanngfw.FqdnListGlobalRulestackResourceListResult{ - // Value: []*armpanngfw.FqdnListGlobalRulestackResource{ - // { - // Name: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaa"), - // Type: to.Ptr("aaaaa"), - // ID: to.Ptr("aaaaaaaaaaaaaaaaaaaaaa"), - // SystemData: &armpanngfw.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // CreatedBy: to.Ptr("praval"), - // CreatedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // LastModifiedBy: to.Ptr("praval"), - // LastModifiedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // }, - // Properties: &armpanngfw.FqdnObject{ - // Description: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaa"), - // AuditComment: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaa"), - // Etag: to.Ptr("aaaaaaaaaaaaaaaaaa"), - // FqdnList: []*string{ - // to.Ptr("string1"), - // to.Ptr("string2")}, - // ProvisioningState: to.Ptr(armpanngfw.ProvisioningStateSucceeded), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FqdnListGlobalRulestack_List_MinimumSet_Gen.json -func ExampleFqdnListGlobalRulestackClient_NewListPager_fqdnListGlobalRulestackListMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewFqdnListGlobalRulestackClient().NewListPager("praval", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.FqdnListGlobalRulestackResourceListResult = armpanngfw.FqdnListGlobalRulestackResourceListResult{ - // Value: []*armpanngfw.FqdnListGlobalRulestackResource{ - // { - // ID: to.Ptr("/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/praval/fqdnlists/fqdnlists1"), - // Properties: &armpanngfw.FqdnObject{ - // FqdnList: []*string{ - // to.Ptr("string1"), - // to.Ptr("string2")}, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FqdnListGlobalRulestack_Get_MaximumSet_Gen.json -func ExampleFqdnListGlobalRulestackClient_Get_fqdnListGlobalRulestackGetMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewFqdnListGlobalRulestackClient().Get(ctx, "praval", "armid1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.FqdnListGlobalRulestackResource = armpanngfw.FqdnListGlobalRulestackResource{ - // Name: to.Ptr("armid1"), - // Type: to.Ptr("certificates"), - // ID: to.Ptr("/providers/PaloAltoNetworks.Cloudngfw/globalrulestacks/armid1/certificates/armid1"), - // SystemData: &armpanngfw.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // CreatedBy: to.Ptr("praval"), - // CreatedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // LastModifiedBy: to.Ptr("praval"), - // LastModifiedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // }, - // Properties: &armpanngfw.FqdnObject{ - // Description: to.Ptr("string"), - // AuditComment: to.Ptr("string"), - // Etag: to.Ptr("aaaaaaaaaaaaaaaaaa"), - // FqdnList: []*string{ - // to.Ptr("string1"), - // to.Ptr("string2")}, - // ProvisioningState: to.Ptr(armpanngfw.ProvisioningStateSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FqdnListGlobalRulestack_Get_MinimumSet_Gen.json -func ExampleFqdnListGlobalRulestackClient_Get_fqdnListGlobalRulestackGetMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewFqdnListGlobalRulestackClient().Get(ctx, "praval", "armid1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.FqdnListGlobalRulestackResource = armpanngfw.FqdnListGlobalRulestackResource{ - // ID: to.Ptr("/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/praval/fqdnlists/armid1"), - // Properties: &armpanngfw.FqdnObject{ - // FqdnList: []*string{ - // to.Ptr("string1"), - // to.Ptr("string2")}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FqdnListGlobalRulestack_CreateOrUpdate_MaximumSet_Gen.json -func ExampleFqdnListGlobalRulestackClient_BeginCreateOrUpdate_fqdnListGlobalRulestackCreateOrUpdateMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewFqdnListGlobalRulestackClient().BeginCreateOrUpdate(ctx, "praval", "armid1", armpanngfw.FqdnListGlobalRulestackResource{ - Properties: &armpanngfw.FqdnObject{ - Description: to.Ptr("string"), - AuditComment: to.Ptr("string"), - Etag: to.Ptr("aaaaaaaaaaaaaaaaaa"), - FqdnList: []*string{ - to.Ptr("string1"), - to.Ptr("string2")}, - ProvisioningState: to.Ptr(armpanngfw.ProvisioningStateAccepted), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.FqdnListGlobalRulestackResource = armpanngfw.FqdnListGlobalRulestackResource{ - // Name: to.Ptr("armid1"), - // Type: to.Ptr("certificates"), - // ID: to.Ptr("/providers/PaloAltoNetworks.Cloudngfw/globalrulestacks/armid1/certificates/armid1"), - // SystemData: &armpanngfw.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // CreatedBy: to.Ptr("praval"), - // CreatedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // LastModifiedBy: to.Ptr("praval"), - // LastModifiedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // }, - // Properties: &armpanngfw.FqdnObject{ - // Description: to.Ptr("string"), - // AuditComment: to.Ptr("string"), - // Etag: to.Ptr("aaaaaaaaaaaaaaaaaa"), - // FqdnList: []*string{ - // to.Ptr("string1"), - // to.Ptr("string2")}, - // ProvisioningState: to.Ptr(armpanngfw.ProvisioningStateSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FqdnListGlobalRulestack_CreateOrUpdate_MinimumSet_Gen.json -func ExampleFqdnListGlobalRulestackClient_BeginCreateOrUpdate_fqdnListGlobalRulestackCreateOrUpdateMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewFqdnListGlobalRulestackClient().BeginCreateOrUpdate(ctx, "praval", "armid1", armpanngfw.FqdnListGlobalRulestackResource{ - Properties: &armpanngfw.FqdnObject{ - FqdnList: []*string{ - to.Ptr("string1"), - to.Ptr("string2")}, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.FqdnListGlobalRulestackResource = armpanngfw.FqdnListGlobalRulestackResource{ - // ID: to.Ptr("/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/praval/fqdnlists/armid1"), - // Properties: &armpanngfw.FqdnObject{ - // FqdnList: []*string{ - // to.Ptr("string1"), - // to.Ptr("string2")}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FqdnListGlobalRulestack_Delete_MaximumSet_Gen.json -func ExampleFqdnListGlobalRulestackClient_BeginDelete_fqdnListGlobalRulestackDeleteMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewFqdnListGlobalRulestackClient().BeginDelete(ctx, "praval", "armid1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FqdnListGlobalRulestack_Delete_MinimumSet_Gen.json -func ExampleFqdnListGlobalRulestackClient_BeginDelete_fqdnListGlobalRulestackDeleteMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewFqdnListGlobalRulestackClient().BeginDelete(ctx, "praval", "armid1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/fqdnlistlocalrulestack_client_example_test.go b/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/fqdnlistlocalrulestack_client_example_test.go deleted file mode 100644 index 593aa6d5568e..000000000000 --- a/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/fqdnlistlocalrulestack_client_example_test.go +++ /dev/null @@ -1,311 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// 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. -// DO NOT EDIT. - -package armpanngfw_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FqdnListLocalRulestack_ListByLocalRulestacks_MaximumSet_Gen.json -func ExampleFqdnListLocalRulestackClient_NewListByLocalRulestacksPager_fqdnListLocalRulestackListByLocalRulestacksMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewFqdnListLocalRulestackClient().NewListByLocalRulestacksPager("rgopenapi", "lrs1", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.FqdnListLocalRulestackResourceListResult = armpanngfw.FqdnListLocalRulestackResourceListResult{ - // Value: []*armpanngfw.FqdnListLocalRulestackResource{ - // { - // Name: to.Ptr("aaaaaaaaaaaaaa"), - // Type: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // ID: to.Ptr("aaaaaaaaa"), - // SystemData: &armpanngfw.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // CreatedBy: to.Ptr("praval"), - // CreatedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // LastModifiedBy: to.Ptr("praval"), - // LastModifiedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // }, - // Properties: &armpanngfw.FqdnObject{ - // Description: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaa"), - // AuditComment: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaa"), - // Etag: to.Ptr("aaaaaaaaaaaaaaaaaa"), - // FqdnList: []*string{ - // to.Ptr("string1"), - // to.Ptr("string2")}, - // ProvisioningState: to.Ptr(armpanngfw.ProvisioningStateSucceeded), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FqdnListLocalRulestack_ListByLocalRulestacks_MinimumSet_Gen.json -func ExampleFqdnListLocalRulestackClient_NewListByLocalRulestacksPager_fqdnListLocalRulestackListByLocalRulestacksMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewFqdnListLocalRulestackClient().NewListByLocalRulestacksPager("rgopenapi", "lrs1", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.FqdnListLocalRulestackResourceListResult = armpanngfw.FqdnListLocalRulestackResourceListResult{ - // Value: []*armpanngfw.FqdnListLocalRulestackResource{ - // { - // ID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourcegroups/rgopenapi/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/praval/fqdnlists/fqdnlists1"), - // Properties: &armpanngfw.FqdnObject{ - // FqdnList: []*string{ - // to.Ptr("string1"), - // to.Ptr("string2")}, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FqdnListLocalRulestack_Get_MaximumSet_Gen.json -func ExampleFqdnListLocalRulestackClient_Get_fqdnListLocalRulestackGetMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewFqdnListLocalRulestackClient().Get(ctx, "rgopenapi", "lrs1", "armid1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.FqdnListLocalRulestackResource = armpanngfw.FqdnListLocalRulestackResource{ - // Name: to.Ptr("armid1"), - // Type: to.Ptr("certificates"), - // ID: to.Ptr("/providers/PaloAltoNetworks.Cloudngfw/globalrulestacks/armid1/certificates/armid1"), - // SystemData: &armpanngfw.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // CreatedBy: to.Ptr("praval"), - // CreatedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // LastModifiedBy: to.Ptr("praval"), - // LastModifiedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // }, - // Properties: &armpanngfw.FqdnObject{ - // Description: to.Ptr("string"), - // AuditComment: to.Ptr("string"), - // Etag: to.Ptr("aaaaaaaaaaaaaaaaaa"), - // FqdnList: []*string{ - // to.Ptr("string1"), - // to.Ptr("string2")}, - // ProvisioningState: to.Ptr(armpanngfw.ProvisioningStateSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FqdnListLocalRulestack_Get_MinimumSet_Gen.json -func ExampleFqdnListLocalRulestackClient_Get_fqdnListLocalRulestackGetMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewFqdnListLocalRulestackClient().Get(ctx, "rgopenapi", "lrs1", "armid1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.FqdnListLocalRulestackResource = armpanngfw.FqdnListLocalRulestackResource{ - // ID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourcegroups/rgopenapi/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/praval/fqdnlists/armid1"), - // Properties: &armpanngfw.FqdnObject{ - // FqdnList: []*string{ - // to.Ptr("string1"), - // to.Ptr("string2")}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FqdnListLocalRulestack_CreateOrUpdate_MaximumSet_Gen.json -func ExampleFqdnListLocalRulestackClient_BeginCreateOrUpdate_fqdnListLocalRulestackCreateOrUpdateMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewFqdnListLocalRulestackClient().BeginCreateOrUpdate(ctx, "rgopenapi", "lrs1", "armid1", armpanngfw.FqdnListLocalRulestackResource{ - Properties: &armpanngfw.FqdnObject{ - Description: to.Ptr("string"), - AuditComment: to.Ptr("string"), - Etag: to.Ptr("aaaaaaaaaaaaaaaaaa"), - FqdnList: []*string{ - to.Ptr("string1"), - to.Ptr("string2")}, - ProvisioningState: to.Ptr(armpanngfw.ProvisioningStateAccepted), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.FqdnListLocalRulestackResource = armpanngfw.FqdnListLocalRulestackResource{ - // Name: to.Ptr("armid1"), - // Type: to.Ptr("certificates"), - // ID: to.Ptr("/providers/PaloAltoNetworks.Cloudngfw/globalrulestacks/armid1/certificates/armid1"), - // SystemData: &armpanngfw.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // CreatedBy: to.Ptr("praval"), - // CreatedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // LastModifiedBy: to.Ptr("praval"), - // LastModifiedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // }, - // Properties: &armpanngfw.FqdnObject{ - // Description: to.Ptr("string"), - // AuditComment: to.Ptr("string"), - // Etag: to.Ptr("aaaaaaaaaaaaaaaaaa"), - // FqdnList: []*string{ - // to.Ptr("string1"), - // to.Ptr("string2")}, - // ProvisioningState: to.Ptr(armpanngfw.ProvisioningStateSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FqdnListLocalRulestack_CreateOrUpdate_MinimumSet_Gen.json -func ExampleFqdnListLocalRulestackClient_BeginCreateOrUpdate_fqdnListLocalRulestackCreateOrUpdateMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewFqdnListLocalRulestackClient().BeginCreateOrUpdate(ctx, "rgopenapi", "lrs1", "armid1", armpanngfw.FqdnListLocalRulestackResource{ - Properties: &armpanngfw.FqdnObject{ - FqdnList: []*string{ - to.Ptr("string1"), - to.Ptr("string2")}, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.FqdnListLocalRulestackResource = armpanngfw.FqdnListLocalRulestackResource{ - // ID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourcegroups/rgopenapi/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/praval/fqdnlists/armid1"), - // Properties: &armpanngfw.FqdnObject{ - // FqdnList: []*string{ - // to.Ptr("string1"), - // to.Ptr("string2")}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FqdnListLocalRulestack_Delete_MaximumSet_Gen.json -func ExampleFqdnListLocalRulestackClient_BeginDelete_fqdnListLocalRulestackDeleteMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewFqdnListLocalRulestackClient().BeginDelete(ctx, "rgopenapi", "lrs1", "armid1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/FqdnListLocalRulestack_Delete_MinimumSet_Gen.json -func ExampleFqdnListLocalRulestackClient_BeginDelete_fqdnListLocalRulestackDeleteMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewFqdnListLocalRulestackClient().BeginDelete(ctx, "rgopenapi", "lrs1", "armid1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/globalrulestack_client_example_test.go b/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/globalrulestack_client_example_test.go deleted file mode 100644 index b7cbad9ced12..000000000000 --- a/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/globalrulestack_client_example_test.go +++ /dev/null @@ -1,987 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// 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. -// DO NOT EDIT. - -package armpanngfw_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_List_MaximumSet_Gen.json -func ExampleGlobalRulestackClient_NewListPager_globalRulestackListMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewGlobalRulestackClient().NewListPager(nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.GlobalRulestackResourceListResult = armpanngfw.GlobalRulestackResourceListResult{ - // Value: []*armpanngfw.GlobalRulestackResource{ - // { - // Name: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaa"), - // Type: to.Ptr("aaaaaaaaaaaaaaaaaa"), - // ID: to.Ptr("aaaaaaaaaa"), - // SystemData: &armpanngfw.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // CreatedBy: to.Ptr("praval"), - // CreatedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // LastModifiedBy: to.Ptr("praval"), - // LastModifiedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // }, - // Identity: &armpanngfw.AzureResourceManagerManagedIdentityProperties{ - // Type: to.Ptr(armpanngfw.ManagedIdentityTypeNone), - // PrincipalID: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaa"), - // TenantID: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // UserAssignedIdentities: map[string]*armpanngfw.AzureResourceManagerUserAssignedIdentity{ - // "key16": &armpanngfw.AzureResourceManagerUserAssignedIdentity{ - // ClientID: to.Ptr("aaaa"), - // PrincipalID: to.Ptr("aaaaaaaaaaaaaaa"), - // }, - // }, - // }, - // Location: to.Ptr("eastus"), - // Properties: &armpanngfw.RulestackProperties{ - // Description: to.Ptr("aaaaaaaaaaaaaaaaaaaaa"), - // AssociatedSubscriptions: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaa")}, - // DefaultMode: to.Ptr(armpanngfw.DefaultModeIPS), - // MinAppIDVersion: to.Ptr("aaaaaaaaaaaaaaaaaaaaa"), - // PanEtag: to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c12"), - // PanLocation: to.Ptr("eastus"), - // ProvisioningState: to.Ptr(armpanngfw.ProvisioningStateSucceeded), - // Scope: to.Ptr(armpanngfw.ScopeTypeLOCAL), - // SecurityServices: &armpanngfw.SecurityServices{ - // AntiSpywareProfile: to.Ptr("aaaaaaaaaa"), - // AntiVirusProfile: to.Ptr("aaaaaaaaaaaaaaaaaaaaaa"), - // DNSSubscription: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // FileBlockingProfile: to.Ptr("aaaaa"), - // OutboundTrustCertificate: to.Ptr("aaaaaa"), - // OutboundUnTrustCertificate: to.Ptr("aaaaaaaa"), - // URLFilteringProfile: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // VulnerabilityProfile: to.Ptr("aaaaaaaaaa"), - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_List_MinimumSet_Gen.json -func ExampleGlobalRulestackClient_NewListPager_globalRulestackListMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewGlobalRulestackClient().NewListPager(nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.GlobalRulestackResourceListResult = armpanngfw.GlobalRulestackResourceListResult{ - // Value: []*armpanngfw.GlobalRulestackResource{ - // { - // ID: to.Ptr("/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/grs1"), - // Location: to.Ptr("eastus"), - // Properties: &armpanngfw.RulestackProperties{ - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_Get_MaximumSet_Gen.json -func ExampleGlobalRulestackClient_Get_globalRulestackGetMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewGlobalRulestackClient().Get(ctx, "praval", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.GlobalRulestackResource = armpanngfw.GlobalRulestackResource{ - // Name: to.Ptr("armid1"), - // Type: to.Ptr("globalRulestacks"), - // ID: to.Ptr("/providers/PaloAltoNetworks.Cloudngfw/globalrulestacks/armid1"), - // SystemData: &armpanngfw.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // CreatedBy: to.Ptr("praval"), - // CreatedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // LastModifiedBy: to.Ptr("praval"), - // LastModifiedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // }, - // Identity: &armpanngfw.AzureResourceManagerManagedIdentityProperties{ - // Type: to.Ptr(armpanngfw.ManagedIdentityTypeNone), - // PrincipalID: to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c27"), - // TenantID: to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c27"), - // UserAssignedIdentities: map[string]*armpanngfw.AzureResourceManagerUserAssignedIdentity{ - // "key16": &armpanngfw.AzureResourceManagerUserAssignedIdentity{ - // ClientID: to.Ptr("aaaa"), - // PrincipalID: to.Ptr("aaaaaaaaaaaaaaa"), - // }, - // }, - // }, - // Location: to.Ptr("eastus"), - // Properties: &armpanngfw.RulestackProperties{ - // Description: to.Ptr("global rulestacks"), - // AssociatedSubscriptions: []*string{ - // to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c27")}, - // DefaultMode: to.Ptr(armpanngfw.DefaultModeIPS), - // MinAppIDVersion: to.Ptr("8.5.3"), - // PanEtag: to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c12"), - // PanLocation: to.Ptr("eastus"), - // ProvisioningState: to.Ptr(armpanngfw.ProvisioningStateSucceeded), - // Scope: to.Ptr(armpanngfw.ScopeTypeGLOBAL), - // SecurityServices: &armpanngfw.SecurityServices{ - // AntiSpywareProfile: to.Ptr("default"), - // AntiVirusProfile: to.Ptr("default"), - // DNSSubscription: to.Ptr("default"), - // FileBlockingProfile: to.Ptr("default"), - // OutboundTrustCertificate: to.Ptr("default"), - // OutboundUnTrustCertificate: to.Ptr("default"), - // URLFilteringProfile: to.Ptr("default"), - // VulnerabilityProfile: to.Ptr("default"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_Get_MinimumSet_Gen.json -func ExampleGlobalRulestackClient_Get_globalRulestackGetMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewGlobalRulestackClient().Get(ctx, "praval", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.GlobalRulestackResource = armpanngfw.GlobalRulestackResource{ - // ID: to.Ptr("/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/praval"), - // Location: to.Ptr("eastus"), - // Properties: &armpanngfw.RulestackProperties{ - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_CreateOrUpdate_MaximumSet_Gen.json -func ExampleGlobalRulestackClient_BeginCreateOrUpdate_globalRulestackCreateOrUpdateMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewGlobalRulestackClient().BeginCreateOrUpdate(ctx, "praval", armpanngfw.GlobalRulestackResource{ - Identity: &armpanngfw.AzureResourceManagerManagedIdentityProperties{ - Type: to.Ptr(armpanngfw.ManagedIdentityTypeNone), - UserAssignedIdentities: map[string]*armpanngfw.AzureResourceManagerUserAssignedIdentity{ - "key16": { - ClientID: to.Ptr("aaaa"), - PrincipalID: to.Ptr("aaaaaaaaaaaaaaa"), - }, - }, - }, - Location: to.Ptr("eastus"), - Properties: &armpanngfw.RulestackProperties{ - Description: to.Ptr("global rulestacks"), - AssociatedSubscriptions: []*string{ - to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c27")}, - DefaultMode: to.Ptr(armpanngfw.DefaultModeIPS), - MinAppIDVersion: to.Ptr("8.5.3"), - PanEtag: to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c12"), - PanLocation: to.Ptr("eastus"), - ProvisioningState: to.Ptr(armpanngfw.ProvisioningStateAccepted), - Scope: to.Ptr(armpanngfw.ScopeTypeGLOBAL), - SecurityServices: &armpanngfw.SecurityServices{ - AntiSpywareProfile: to.Ptr("default"), - AntiVirusProfile: to.Ptr("default"), - DNSSubscription: to.Ptr("default"), - FileBlockingProfile: to.Ptr("default"), - OutboundTrustCertificate: to.Ptr("default"), - OutboundUnTrustCertificate: to.Ptr("default"), - URLFilteringProfile: to.Ptr("default"), - VulnerabilityProfile: to.Ptr("default"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.GlobalRulestackResource = armpanngfw.GlobalRulestackResource{ - // Name: to.Ptr("armid1"), - // Type: to.Ptr("globalRulestacks"), - // ID: to.Ptr("/providers/PaloAltoNetworks.Cloudngfw/globalrulestacks/armid1"), - // SystemData: &armpanngfw.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // CreatedBy: to.Ptr("praval"), - // CreatedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // LastModifiedBy: to.Ptr("praval"), - // LastModifiedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // }, - // Identity: &armpanngfw.AzureResourceManagerManagedIdentityProperties{ - // Type: to.Ptr(armpanngfw.ManagedIdentityTypeNone), - // PrincipalID: to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c27"), - // TenantID: to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c27"), - // UserAssignedIdentities: map[string]*armpanngfw.AzureResourceManagerUserAssignedIdentity{ - // "key16": &armpanngfw.AzureResourceManagerUserAssignedIdentity{ - // ClientID: to.Ptr("aaaa"), - // PrincipalID: to.Ptr("aaaaaaaaaaaaaaa"), - // }, - // }, - // }, - // Location: to.Ptr("eastus"), - // Properties: &armpanngfw.RulestackProperties{ - // Description: to.Ptr("global rulestacks"), - // AssociatedSubscriptions: []*string{ - // to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c27")}, - // DefaultMode: to.Ptr(armpanngfw.DefaultModeIPS), - // MinAppIDVersion: to.Ptr("8.5.3"), - // PanEtag: to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c12"), - // PanLocation: to.Ptr("eastus"), - // ProvisioningState: to.Ptr(armpanngfw.ProvisioningStateSucceeded), - // Scope: to.Ptr(armpanngfw.ScopeTypeGLOBAL), - // SecurityServices: &armpanngfw.SecurityServices{ - // AntiSpywareProfile: to.Ptr("default"), - // AntiVirusProfile: to.Ptr("default"), - // DNSSubscription: to.Ptr("default"), - // FileBlockingProfile: to.Ptr("default"), - // OutboundTrustCertificate: to.Ptr("default"), - // OutboundUnTrustCertificate: to.Ptr("default"), - // URLFilteringProfile: to.Ptr("default"), - // VulnerabilityProfile: to.Ptr("default"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_CreateOrUpdate_MinimumSet_Gen.json -func ExampleGlobalRulestackClient_BeginCreateOrUpdate_globalRulestackCreateOrUpdateMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewGlobalRulestackClient().BeginCreateOrUpdate(ctx, "praval", armpanngfw.GlobalRulestackResource{ - Location: to.Ptr("eastus"), - Properties: &armpanngfw.RulestackProperties{}, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.GlobalRulestackResource = armpanngfw.GlobalRulestackResource{ - // ID: to.Ptr("/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/praval"), - // Location: to.Ptr("eastus"), - // Properties: &armpanngfw.RulestackProperties{ - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_Update_MaximumSet_Gen.json -func ExampleGlobalRulestackClient_Update_globalRulestackUpdateMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewGlobalRulestackClient().Update(ctx, "praval", armpanngfw.GlobalRulestackResourceUpdate{ - Identity: &armpanngfw.AzureResourceManagerManagedIdentityProperties{ - Type: to.Ptr(armpanngfw.ManagedIdentityTypeNone), - UserAssignedIdentities: map[string]*armpanngfw.AzureResourceManagerUserAssignedIdentity{ - "key16": { - ClientID: to.Ptr("aaaa"), - PrincipalID: to.Ptr("aaaaaaaaaaaaaaa"), - }, - }, - }, - Location: to.Ptr("eastus"), - Properties: &armpanngfw.GlobalRulestackResourceUpdateProperties{ - Description: to.Ptr("global rulestacks"), - AssociatedSubscriptions: []*string{ - to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c27")}, - DefaultMode: to.Ptr(armpanngfw.DefaultModeIPS), - MinAppIDVersion: to.Ptr("8.5.3"), - PanEtag: to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c12"), - PanLocation: to.Ptr("eastus"), - Scope: to.Ptr(armpanngfw.ScopeTypeGLOBAL), - SecurityServices: &armpanngfw.SecurityServices{ - AntiSpywareProfile: to.Ptr("default"), - AntiVirusProfile: to.Ptr("default"), - DNSSubscription: to.Ptr("default"), - FileBlockingProfile: to.Ptr("default"), - OutboundTrustCertificate: to.Ptr("default"), - OutboundUnTrustCertificate: to.Ptr("default"), - URLFilteringProfile: to.Ptr("default"), - VulnerabilityProfile: to.Ptr("default"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.GlobalRulestackResource = armpanngfw.GlobalRulestackResource{ - // Name: to.Ptr("armid1"), - // Type: to.Ptr("globalRulestacks"), - // ID: to.Ptr("/providers/PaloAltoNetworks.Cloudngfw/globalrulestacks/armid1"), - // SystemData: &armpanngfw.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // CreatedBy: to.Ptr("praval"), - // CreatedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // LastModifiedBy: to.Ptr("praval"), - // LastModifiedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // }, - // Identity: &armpanngfw.AzureResourceManagerManagedIdentityProperties{ - // Type: to.Ptr(armpanngfw.ManagedIdentityTypeNone), - // PrincipalID: to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c27"), - // TenantID: to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c27"), - // UserAssignedIdentities: map[string]*armpanngfw.AzureResourceManagerUserAssignedIdentity{ - // "key16": &armpanngfw.AzureResourceManagerUserAssignedIdentity{ - // ClientID: to.Ptr("aaaa"), - // PrincipalID: to.Ptr("aaaaaaaaaaaaaaa"), - // }, - // }, - // }, - // Location: to.Ptr("eastus"), - // Properties: &armpanngfw.RulestackProperties{ - // Description: to.Ptr("global rulestacks"), - // AssociatedSubscriptions: []*string{ - // to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c27")}, - // DefaultMode: to.Ptr(armpanngfw.DefaultModeIPS), - // MinAppIDVersion: to.Ptr("8.5.3"), - // PanEtag: to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c12"), - // PanLocation: to.Ptr("eastus"), - // ProvisioningState: to.Ptr(armpanngfw.ProvisioningStateSucceeded), - // Scope: to.Ptr(armpanngfw.ScopeTypeGLOBAL), - // SecurityServices: &armpanngfw.SecurityServices{ - // AntiSpywareProfile: to.Ptr("default"), - // AntiVirusProfile: to.Ptr("default"), - // DNSSubscription: to.Ptr("default"), - // FileBlockingProfile: to.Ptr("default"), - // OutboundTrustCertificate: to.Ptr("default"), - // OutboundUnTrustCertificate: to.Ptr("default"), - // URLFilteringProfile: to.Ptr("default"), - // VulnerabilityProfile: to.Ptr("default"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_Update_MinimumSet_Gen.json -func ExampleGlobalRulestackClient_Update_globalRulestackUpdateMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewGlobalRulestackClient().Update(ctx, "praval", armpanngfw.GlobalRulestackResourceUpdate{}, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.GlobalRulestackResource = armpanngfw.GlobalRulestackResource{ - // Location: to.Ptr("eastus"), - // Properties: &armpanngfw.RulestackProperties{ - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_Delete_MaximumSet_Gen.json -func ExampleGlobalRulestackClient_BeginDelete_globalRulestackDeleteMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewGlobalRulestackClient().BeginDelete(ctx, "praval", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_Delete_MinimumSet_Gen.json -func ExampleGlobalRulestackClient_BeginDelete_globalRulestackDeleteMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewGlobalRulestackClient().BeginDelete(ctx, "praval", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_commit_MaximumSet_Gen.json -func ExampleGlobalRulestackClient_BeginCommit_globalRulestackCommitMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewGlobalRulestackClient().BeginCommit(ctx, "praval", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_commit_MinimumSet_Gen.json -func ExampleGlobalRulestackClient_BeginCommit_globalRulestackCommitMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewGlobalRulestackClient().BeginCommit(ctx, "praval", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_getChangeLog_MaximumSet_Gen.json -func ExampleGlobalRulestackClient_GetChangeLog_globalRulestackGetChangeLogMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewGlobalRulestackClient().GetChangeLog(ctx, "praval", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Changelog = armpanngfw.Changelog{ - // Changes: []*string{ - // to.Ptr("aaaa")}, - // LastCommitted: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_getChangeLog_MinimumSet_Gen.json -func ExampleGlobalRulestackClient_GetChangeLog_globalRulestackGetChangeLogMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewGlobalRulestackClient().GetChangeLog(ctx, "praval", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Changelog = armpanngfw.Changelog{ - // Changes: []*string{ - // to.Ptr("aaaa")}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_listAdvancedSecurityObjects_MaximumSet_Gen.json -func ExampleGlobalRulestackClient_ListAdvancedSecurityObjects_globalRulestackListAdvancedSecurityObjectsMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewGlobalRulestackClient().ListAdvancedSecurityObjects(ctx, "praval", armpanngfw.AdvSecurityObjectTypeEnum("globalRulestacks"), &armpanngfw.GlobalRulestackClientListAdvancedSecurityObjectsOptions{Skip: to.Ptr("a6a321"), - Top: to.Ptr[int32](20), - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.AdvSecurityObjectListResponse = armpanngfw.AdvSecurityObjectListResponse{ - // Value: &armpanngfw.AdvSecurityObjectModel{ - // Type: to.Ptr("globalRulestacks"), - // Entry: []*armpanngfw.NameDescriptionObject{ - // { - // Name: to.Ptr("aaaaaaaaaa"), - // Description: to.Ptr("aaaaaaaaaaaa"), - // }}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_listAdvancedSecurityObjects_MinimumSet_Gen.json -func ExampleGlobalRulestackClient_ListAdvancedSecurityObjects_globalRulestackListAdvancedSecurityObjectsMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewGlobalRulestackClient().ListAdvancedSecurityObjects(ctx, "praval", armpanngfw.AdvSecurityObjectTypeEnum("globalRulestacks"), &armpanngfw.GlobalRulestackClientListAdvancedSecurityObjectsOptions{Skip: nil, - Top: nil, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.AdvSecurityObjectListResponse = armpanngfw.AdvSecurityObjectListResponse{ - // Value: &armpanngfw.AdvSecurityObjectModel{ - // Entry: []*armpanngfw.NameDescriptionObject{ - // { - // Name: to.Ptr("aaaaaaaaaa"), - // }}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_listAppIds_MaximumSet_Gen.json -func ExampleGlobalRulestackClient_ListAppIDs_globalRulestackListAppIdsMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewGlobalRulestackClient().ListAppIDs(ctx, "praval", &armpanngfw.GlobalRulestackClientListAppIDsOptions{AppIDVersion: to.Ptr("8543"), - AppPrefix: to.Ptr("pref"), - Skip: to.Ptr("a6a321"), - Top: to.Ptr[int32](20), - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ListAppIDResponse = armpanngfw.ListAppIDResponse{ - // Value: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaaaaaa")}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_listAppIds_MinimumSet_Gen.json -func ExampleGlobalRulestackClient_ListAppIDs_globalRulestackListAppIdsMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewGlobalRulestackClient().ListAppIDs(ctx, "praval", &armpanngfw.GlobalRulestackClientListAppIDsOptions{AppIDVersion: nil, - AppPrefix: nil, - Skip: nil, - Top: nil, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ListAppIDResponse = armpanngfw.ListAppIDResponse{ - // Value: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaaaaaa")}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_listCountries_MaximumSet_Gen.json -func ExampleGlobalRulestackClient_ListCountries_globalRulestackListCountriesMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewGlobalRulestackClient().ListCountries(ctx, "praval", &armpanngfw.GlobalRulestackClientListCountriesOptions{Skip: to.Ptr("a6a321"), - Top: to.Ptr[int32](20), - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.CountriesResponse = armpanngfw.CountriesResponse{ - // Value: []*armpanngfw.Country{ - // { - // Description: to.Ptr("aaaaa"), - // Code: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaa"), - // }}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_listCountries_MinimumSet_Gen.json -func ExampleGlobalRulestackClient_ListCountries_globalRulestackListCountriesMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewGlobalRulestackClient().ListCountries(ctx, "praval", &armpanngfw.GlobalRulestackClientListCountriesOptions{Skip: nil, - Top: nil, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.CountriesResponse = armpanngfw.CountriesResponse{ - // Value: []*armpanngfw.Country{ - // { - // Code: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaa"), - // }}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_listFirewalls_MaximumSet_Gen.json -func ExampleGlobalRulestackClient_ListFirewalls_globalRulestackListFirewallsMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewGlobalRulestackClient().ListFirewalls(ctx, "praval", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ListFirewallsResponse = armpanngfw.ListFirewallsResponse{ - // Value: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaa")}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_listFirewalls_MinimumSet_Gen.json -func ExampleGlobalRulestackClient_ListFirewalls_globalRulestackListFirewallsMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewGlobalRulestackClient().ListFirewalls(ctx, "praval", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ListFirewallsResponse = armpanngfw.ListFirewallsResponse{ - // Value: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaa")}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_listPredefinedUrlCategories_MaximumSet_Gen.json -func ExampleGlobalRulestackClient_ListPredefinedURLCategories_globalRulestackListPredefinedUrlCategoriesMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewGlobalRulestackClient().ListPredefinedURLCategories(ctx, "praval", &armpanngfw.GlobalRulestackClientListPredefinedURLCategoriesOptions{Skip: to.Ptr("a6a321"), - Top: to.Ptr[int32](20), - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PredefinedURLCategoriesResponse = armpanngfw.PredefinedURLCategoriesResponse{ - // Value: []*armpanngfw.PredefinedURLCategory{ - // { - // Name: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaa"), - // Action: to.Ptr("aaaaaaa"), - // }}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_listPredefinedUrlCategories_MinimumSet_Gen.json -func ExampleGlobalRulestackClient_ListPredefinedURLCategories_globalRulestackListPredefinedUrlCategoriesMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewGlobalRulestackClient().ListPredefinedURLCategories(ctx, "praval", &armpanngfw.GlobalRulestackClientListPredefinedURLCategoriesOptions{Skip: nil, - Top: nil, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PredefinedURLCategoriesResponse = armpanngfw.PredefinedURLCategoriesResponse{ - // Value: []*armpanngfw.PredefinedURLCategory{ - // { - // Name: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaa"), - // Action: to.Ptr("aaaaaaa"), - // }}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_listSecurityServices_MaximumSet_Gen.json -func ExampleGlobalRulestackClient_ListSecurityServices_globalRulestackListSecurityServicesMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewGlobalRulestackClient().ListSecurityServices(ctx, "praval", armpanngfw.SecurityServicesTypeEnum("globalRulestacks"), &armpanngfw.GlobalRulestackClientListSecurityServicesOptions{Skip: to.Ptr("a6a321"), - Top: to.Ptr[int32](20), - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SecurityServicesResponse = armpanngfw.SecurityServicesResponse{ - // Value: &armpanngfw.SecurityServicesTypeList{ - // Type: to.Ptr("globalRulestacks"), - // Entry: []*armpanngfw.NameDescriptionObject{ - // { - // Name: to.Ptr("aaaaaaaaaa"), - // Description: to.Ptr("aaaaaaaaaaaa"), - // }}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_listSecurityServices_MinimumSet_Gen.json -func ExampleGlobalRulestackClient_ListSecurityServices_globalRulestackListSecurityServicesMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewGlobalRulestackClient().ListSecurityServices(ctx, "praval", armpanngfw.SecurityServicesTypeEnum("globalRulestacks"), &armpanngfw.GlobalRulestackClientListSecurityServicesOptions{Skip: nil, - Top: nil, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SecurityServicesResponse = armpanngfw.SecurityServicesResponse{ - // Value: &armpanngfw.SecurityServicesTypeList{ - // Entry: []*armpanngfw.NameDescriptionObject{ - // { - // Name: to.Ptr("aaaaaaaaaa"), - // }}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_revert_MaximumSet_Gen.json -func ExampleGlobalRulestackClient_Revert_globalRulestackRevertMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewGlobalRulestackClient().Revert(ctx, "praval", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/GlobalRulestack_revert_MinimumSet_Gen.json -func ExampleGlobalRulestackClient_Revert_globalRulestackRevertMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewGlobalRulestackClient().Revert(ctx, "praval", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/go.mod b/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/go.mod index f6f7fce5bdff..9f65011bc0f6 100644 --- a/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/go.mod +++ b/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/go.mod @@ -2,20 +2,12 @@ module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngf go 1.18 -require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0 - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2 -) +require github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0 require ( github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0 // indirect - github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0 // indirect - github.com/golang-jwt/jwt/v4 v4.5.0 // indirect - github.com/google/uuid v1.3.0 // indirect - github.com/kylelemons/godebug v1.1.0 // indirect - github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect - golang.org/x/crypto v0.6.0 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect golang.org/x/net v0.7.0 // indirect - golang.org/x/sys v0.5.0 // indirect golang.org/x/text v0.7.0 // indirect + gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect ) diff --git a/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/go.sum b/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/go.sum index 8ba445a8c4da..b6bd7eaad1ba 100644 --- a/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/go.sum +++ b/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/go.sum @@ -1,31 +1,15 @@ github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0 h1:rTnT/Jrcm+figWlYz4Ixzt0SJVR2cMC8lvZcimipiEY= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0/go.mod h1:ON4tFdPTwRcgWEaVDrN3584Ef+b7GgSJaXxe5fW9t4M= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2 h1:uqM+VoHjVH6zdlkLF2b6O0ZANcHoj3rO0PoQ3jglUJA= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2/go.mod h1:twTKAa1E6hLmSDjLhaCkbTMQKc7p/rNLU40rLxGEOCI= github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0 h1:leh5DwKv6Ihwi+h60uHtn6UWAxBbZ0q8DwQVMzf61zw= github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w= -github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0 h1:UE9n9rkJF62ArLb1F3DEjRt8O3jLwMWdSoypKV4f3MU= -github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0/go.mod h1:kgDmCTgBzIEPFElEF+FK0SdjAor06dRq2Go927dnQ6o= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c= -github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= -github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= -github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= -github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= -golang.org/x/crypto v0.6.0 h1:qfktjS5LUO+fFKeJXZ+ikTRijMmljikvG68fpMMruSc= -golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/localrules_client_example_test.go b/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/localrules_client_example_test.go deleted file mode 100644 index a27d8a63a149..000000000000 --- a/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/localrules_client_example_test.go +++ /dev/null @@ -1,629 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// 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. -// DO NOT EDIT. - -package armpanngfw_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRules_ListByLocalRulestacks_MaximumSet_Gen.json -func ExampleLocalRulesClient_NewListByLocalRulestacksPager_localRulesListByLocalRulestacksMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewLocalRulesClient().NewListByLocalRulestacksPager("firewall-rg", "lrs1", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.LocalRulesResourceListResult = armpanngfw.LocalRulesResourceListResult{ - // Value: []*armpanngfw.LocalRulesResource{ - // { - // Name: to.Ptr("aaaaaaaaaaaaaaaaaaaaaa"), - // Type: to.Ptr("a"), - // ID: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaa"), - // SystemData: &armpanngfw.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // CreatedBy: to.Ptr("praval"), - // CreatedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // LastModifiedBy: to.Ptr("praval"), - // LastModifiedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // }, - // Properties: &armpanngfw.RuleEntry{ - // Description: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // ActionType: to.Ptr(armpanngfw.ActionEnumAllow), - // Applications: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")}, - // AuditComment: to.Ptr("aaa"), - // Category: &armpanngfw.Category{ - // Feeds: []*string{ - // to.Ptr("aaaaaaaaaaaa")}, - // URLCustom: []*string{ - // to.Ptr("aaaaa")}, - // }, - // DecryptionRuleType: to.Ptr(armpanngfw.DecryptionRuleTypeEnumSSLOutboundInspection), - // Destination: &armpanngfw.DestinationAddr{ - // Cidrs: []*string{ - // to.Ptr("aaaaaaa")}, - // Countries: []*string{ - // to.Ptr("aaaaaaaaaaaaaa")}, - // Feeds: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaa")}, - // FqdnLists: []*string{ - // to.Ptr("aaaaaaaaaaaaa")}, - // PrefixLists: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")}, - // }, - // EnableLogging: to.Ptr(armpanngfw.StateEnumDISABLED), - // Etag: to.Ptr("aaaaaaaaaaaaaaaaaaaa"), - // InboundInspectionCertificate: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // NegateDestination: to.Ptr(armpanngfw.BooleanEnumTRUE), - // NegateSource: to.Ptr(armpanngfw.BooleanEnumTRUE), - // Priority: to.Ptr[int32](24), - // ProtocolPortList: []*string{ - // to.Ptr("aaaaaaaaaaaa")}, - // ProvisioningState: to.Ptr(armpanngfw.ProvisioningStateSucceeded), - // RuleName: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaa"), - // RuleState: to.Ptr(armpanngfw.StateEnumDISABLED), - // Source: &armpanngfw.SourceAddr{ - // Cidrs: []*string{ - // to.Ptr("aaa")}, - // Countries: []*string{ - // to.Ptr("aaaaa")}, - // Feeds: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaa")}, - // PrefixLists: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaaa")}, - // }, - // Tags: []*armpanngfw.TagInfo{ - // { - // Key: to.Ptr("keyName"), - // Value: to.Ptr("value"), - // }}, - // Protocol: to.Ptr("aaaa"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRules_ListByLocalRulestacks_MinimumSet_Gen.json -func ExampleLocalRulesClient_NewListByLocalRulestacksPager_localRulesListByLocalRulestacksMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewLocalRulesClient().NewListByLocalRulestacksPager("firewall-rg", "lrs1", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.LocalRulesResourceListResult = armpanngfw.LocalRulesResourceListResult{ - // Value: []*armpanngfw.LocalRulesResource{ - // { - // ID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourcegroups/firewall-rg/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/lrs1/localrules/1"), - // Properties: &armpanngfw.RuleEntry{ - // RuleName: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaa"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRules_Get_MaximumSet_Gen.json -func ExampleLocalRulesClient_Get_localRulesGetMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewLocalRulesClient().Get(ctx, "firewall-rg", "lrs1", "1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.LocalRulesResource = armpanngfw.LocalRulesResource{ - // Name: to.Ptr("aaaaaaaaa"), - // Type: to.Ptr("aaaaaaaaa"), - // ID: to.Ptr("aaaaaaaaaaaaaaaaaaa"), - // SystemData: &armpanngfw.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // CreatedBy: to.Ptr("praval"), - // CreatedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // LastModifiedBy: to.Ptr("praval"), - // LastModifiedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // }, - // Properties: &armpanngfw.RuleEntry{ - // Description: to.Ptr("aaaaaaa"), - // ActionType: to.Ptr(armpanngfw.ActionEnumAllow), - // Applications: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaa")}, - // AuditComment: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaa"), - // Category: &armpanngfw.Category{ - // Feeds: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaa")}, - // URLCustom: []*string{ - // to.Ptr("aa")}, - // }, - // DecryptionRuleType: to.Ptr(armpanngfw.DecryptionRuleTypeEnumSSLOutboundInspection), - // Destination: &armpanngfw.DestinationAddr{ - // Cidrs: []*string{ - // to.Ptr("aaaaaaaaaaaa")}, - // Countries: []*string{ - // to.Ptr("aaaaa")}, - // Feeds: []*string{ - // to.Ptr("aaaaaaa")}, - // FqdnLists: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaa")}, - // PrefixLists: []*string{ - // to.Ptr("aaaaaaaaaaaaa")}, - // }, - // EnableLogging: to.Ptr(armpanngfw.StateEnumDISABLED), - // Etag: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaa"), - // InboundInspectionCertificate: to.Ptr("aaaaaaaaaaaaaaaa"), - // NegateDestination: to.Ptr(armpanngfw.BooleanEnumTRUE), - // NegateSource: to.Ptr(armpanngfw.BooleanEnumTRUE), - // Priority: to.Ptr[int32](13), - // ProtocolPortList: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaaaaa")}, - // ProvisioningState: to.Ptr(armpanngfw.ProvisioningStateSucceeded), - // RuleName: to.Ptr("aaaaaa"), - // RuleState: to.Ptr(armpanngfw.StateEnumDISABLED), - // Source: &armpanngfw.SourceAddr{ - // Cidrs: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaa")}, - // Countries: []*string{ - // to.Ptr("aaaaaaa")}, - // Feeds: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaa")}, - // PrefixLists: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaaa")}, - // }, - // Tags: []*armpanngfw.TagInfo{ - // { - // Key: to.Ptr("keyName"), - // Value: to.Ptr("value"), - // }}, - // Protocol: to.Ptr("aaaaaaaaaaaa"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRules_Get_MinimumSet_Gen.json -func ExampleLocalRulesClient_Get_localRulesGetMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewLocalRulesClient().Get(ctx, "firewall-rg", "lrs1", "1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.LocalRulesResource = armpanngfw.LocalRulesResource{ - // ID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourcegroups/firewall-rg/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/grs1/localrules/1"), - // Properties: &armpanngfw.RuleEntry{ - // RuleName: to.Ptr("aaaaaa"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRules_CreateOrUpdate_MaximumSet_Gen.json -func ExampleLocalRulesClient_BeginCreateOrUpdate_localRulesCreateOrUpdateMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewLocalRulesClient().BeginCreateOrUpdate(ctx, "firewall-rg", "lrs1", "1", armpanngfw.LocalRulesResource{ - Properties: &armpanngfw.RuleEntry{ - Description: to.Ptr("description of local rule"), - ActionType: to.Ptr(armpanngfw.ActionEnumAllow), - Applications: []*string{ - to.Ptr("app1")}, - AuditComment: to.Ptr("example comment"), - Category: &armpanngfw.Category{ - Feeds: []*string{ - to.Ptr("feed")}, - URLCustom: []*string{ - to.Ptr("https://microsoft.com")}, - }, - DecryptionRuleType: to.Ptr(armpanngfw.DecryptionRuleTypeEnumSSLOutboundInspection), - Destination: &armpanngfw.DestinationAddr{ - Cidrs: []*string{ - to.Ptr("1.0.0.1/10")}, - Countries: []*string{ - to.Ptr("India")}, - Feeds: []*string{ - to.Ptr("feed")}, - FqdnLists: []*string{ - to.Ptr("FQDN1")}, - PrefixLists: []*string{ - to.Ptr("PL1")}, - }, - EnableLogging: to.Ptr(armpanngfw.StateEnumDISABLED), - Etag: to.Ptr("c18e6eef-ba3e-49ee-8a85-2b36c863a9d0"), - InboundInspectionCertificate: to.Ptr("cert1"), - NegateDestination: to.Ptr(armpanngfw.BooleanEnumTRUE), - NegateSource: to.Ptr(armpanngfw.BooleanEnumTRUE), - ProtocolPortList: []*string{ - to.Ptr("80")}, - ProvisioningState: to.Ptr(armpanngfw.ProvisioningStateAccepted), - RuleName: to.Ptr("localRule1"), - RuleState: to.Ptr(armpanngfw.StateEnumDISABLED), - Source: &armpanngfw.SourceAddr{ - Cidrs: []*string{ - to.Ptr("1.0.0.1/10")}, - Countries: []*string{ - to.Ptr("India")}, - Feeds: []*string{ - to.Ptr("feed")}, - PrefixLists: []*string{ - to.Ptr("PL1")}, - }, - Tags: []*armpanngfw.TagInfo{ - { - Key: to.Ptr("keyName"), - Value: to.Ptr("value"), - }}, - Protocol: to.Ptr("HTTP"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.LocalRulesResource = armpanngfw.LocalRulesResource{ - // Name: to.Ptr("aaaaaaaaa"), - // Type: to.Ptr("aaaaaaaaa"), - // ID: to.Ptr("aaaaaaaaaaaaaaaaaaa"), - // SystemData: &armpanngfw.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // CreatedBy: to.Ptr("praval"), - // CreatedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // LastModifiedBy: to.Ptr("praval"), - // LastModifiedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // }, - // Properties: &armpanngfw.RuleEntry{ - // Description: to.Ptr("aaaaaaa"), - // ActionType: to.Ptr(armpanngfw.ActionEnumAllow), - // Applications: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaa")}, - // AuditComment: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaa"), - // Category: &armpanngfw.Category{ - // Feeds: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaa")}, - // URLCustom: []*string{ - // to.Ptr("aa")}, - // }, - // DecryptionRuleType: to.Ptr(armpanngfw.DecryptionRuleTypeEnumSSLOutboundInspection), - // Destination: &armpanngfw.DestinationAddr{ - // Cidrs: []*string{ - // to.Ptr("aaaaaaaaaaaa")}, - // Countries: []*string{ - // to.Ptr("aaaaa")}, - // Feeds: []*string{ - // to.Ptr("aaaaaaa")}, - // FqdnLists: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaa")}, - // PrefixLists: []*string{ - // to.Ptr("aaaaaaaaaaaaa")}, - // }, - // EnableLogging: to.Ptr(armpanngfw.StateEnumDISABLED), - // Etag: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaa"), - // InboundInspectionCertificate: to.Ptr("aaaaaaaaaaaaaaaa"), - // NegateDestination: to.Ptr(armpanngfw.BooleanEnumTRUE), - // NegateSource: to.Ptr(armpanngfw.BooleanEnumTRUE), - // Priority: to.Ptr[int32](13), - // ProtocolPortList: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaaaaa")}, - // ProvisioningState: to.Ptr(armpanngfw.ProvisioningStateSucceeded), - // RuleName: to.Ptr("aaaaaa"), - // RuleState: to.Ptr(armpanngfw.StateEnumDISABLED), - // Source: &armpanngfw.SourceAddr{ - // Cidrs: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaa")}, - // Countries: []*string{ - // to.Ptr("aaaaaaa")}, - // Feeds: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaa")}, - // PrefixLists: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaaa")}, - // }, - // Tags: []*armpanngfw.TagInfo{ - // { - // Key: to.Ptr("keyName"), - // Value: to.Ptr("value"), - // }}, - // Protocol: to.Ptr("aaaaaaaaaaaa"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRules_CreateOrUpdate_MinimumSet_Gen.json -func ExampleLocalRulesClient_BeginCreateOrUpdate_localRulesCreateOrUpdateMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewLocalRulesClient().BeginCreateOrUpdate(ctx, "firewall-rg", "lrs1", "1", armpanngfw.LocalRulesResource{ - Properties: &armpanngfw.RuleEntry{ - RuleName: to.Ptr("localRule1"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.LocalRulesResource = armpanngfw.LocalRulesResource{ - // ID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourcegroups/firewall-rg/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/grs1/localrules/1"), - // Properties: &armpanngfw.RuleEntry{ - // RuleName: to.Ptr("aaaaaa"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRules_Delete_MaximumSet_Gen.json -func ExampleLocalRulesClient_BeginDelete_localRulesDeleteMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewLocalRulesClient().BeginDelete(ctx, "firewall-rg", "lrs1", "1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRules_Delete_MinimumSet_Gen.json -func ExampleLocalRulesClient_BeginDelete_localRulesDeleteMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewLocalRulesClient().BeginDelete(ctx, "firewall-rg", "lrs1", "1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRules_getCounters_MaximumSet_Gen.json -func ExampleLocalRulesClient_GetCounters_localRulesGetCountersMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewLocalRulesClient().GetCounters(ctx, "firewall-rg", "lrs1", "1", &armpanngfw.LocalRulesClientGetCountersOptions{FirewallName: to.Ptr("firewall1")}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.RuleCounter = armpanngfw.RuleCounter{ - // AppSeen: &armpanngfw.AppSeenData{ - // AppSeenList: []*armpanngfw.AppSeenInfo{ - // { - // Category: to.Ptr("aaaaaaaaaaaaaaaaaaa"), - // Risk: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaa"), - // StandardPorts: to.Ptr("aaaaaaaaaaaaaaaaaa"), - // SubCategory: to.Ptr("aaaaaaaaaaaaaaaaa"), - // Tag: to.Ptr("aaaaaaaaaa"), - // Technology: to.Ptr("aaaaaaaaaaaaaaaaaaaa"), - // Title: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // }}, - // Count: to.Ptr[int32](13), - // }, - // FirewallName: to.Ptr("aaaaaaaaaaaaaaaaaa"), - // HitCount: to.Ptr[int32](20), - // LastUpdatedTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // Priority: to.Ptr("aaaaaaaaaaaaaaaaaaaa"), - // RequestTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // RuleListName: to.Ptr("aaaaaaaaaaaaaaaaaaa"), - // RuleName: to.Ptr("aaaa"), - // RuleStackName: to.Ptr("aaaaaaaaaaaaaaaaa"), - // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRules_getCounters_MinimumSet_Gen.json -func ExampleLocalRulesClient_GetCounters_localRulesGetCountersMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewLocalRulesClient().GetCounters(ctx, "firewall-rg", "lrs1", "1", &armpanngfw.LocalRulesClientGetCountersOptions{FirewallName: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.RuleCounter = armpanngfw.RuleCounter{ - // Priority: to.Ptr("aaaaaaaaaaaaaaaaaaaa"), - // RuleName: to.Ptr("aaaa"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRules_refreshCounters_MaximumSet_Gen.json -func ExampleLocalRulesClient_RefreshCounters_localRulesRefreshCountersMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewLocalRulesClient().RefreshCounters(ctx, "firewall-rg", "lrs1", "1", &armpanngfw.LocalRulesClientRefreshCountersOptions{FirewallName: to.Ptr("firewall1")}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRules_refreshCounters_MinimumSet_Gen.json -func ExampleLocalRulesClient_RefreshCounters_localRulesRefreshCountersMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewLocalRulesClient().RefreshCounters(ctx, "firewall-rg", "lrs1", "1", &armpanngfw.LocalRulesClientRefreshCountersOptions{FirewallName: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRules_resetCounters_MaximumSet_Gen.json -func ExampleLocalRulesClient_ResetCounters_localRulesResetCountersMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewLocalRulesClient().ResetCounters(ctx, "firewall-rg", "lrs1", "1", &armpanngfw.LocalRulesClientResetCountersOptions{FirewallName: to.Ptr("firewall1")}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.RuleCounterReset = armpanngfw.RuleCounterReset{ - // FirewallName: to.Ptr("aaaaaaaaaaaaaaaaaa"), - // Priority: to.Ptr("aaaaaaa"), - // RuleListName: to.Ptr("aaaaa"), - // RuleName: to.Ptr("aaaaa"), - // RuleStackName: to.Ptr("aa"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRules_resetCounters_MinimumSet_Gen.json -func ExampleLocalRulesClient_ResetCounters_localRulesResetCountersMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewLocalRulesClient().ResetCounters(ctx, "firewall-rg", "lrs1", "1", &armpanngfw.LocalRulesClientResetCountersOptions{FirewallName: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.RuleCounterReset = armpanngfw.RuleCounterReset{ - // } -} diff --git a/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/localrulestacks_client_example_test.go b/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/localrulestacks_client_example_test.go deleted file mode 100644 index abb88a6d7f04..000000000000 --- a/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/localrulestacks_client_example_test.go +++ /dev/null @@ -1,1171 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// 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. -// DO NOT EDIT. - -package armpanngfw_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_ListBySubscription_MaximumSet_Gen.json -func ExampleLocalRulestacksClient_NewListBySubscriptionPager_localRulestacksListBySubscriptionMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewLocalRulestacksClient().NewListBySubscriptionPager(nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.LocalRulestackResourceListResult = armpanngfw.LocalRulestackResourceListResult{ - // Value: []*armpanngfw.LocalRulestackResource{ - // { - // Name: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // Type: to.Ptr("aaaaaaaaaa"), - // ID: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // SystemData: &armpanngfw.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // CreatedBy: to.Ptr("praval"), - // CreatedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // LastModifiedBy: to.Ptr("praval"), - // LastModifiedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // }, - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "tagName": to.Ptr("value"), - // }, - // Identity: &armpanngfw.AzureResourceManagerManagedIdentityProperties{ - // Type: to.Ptr(armpanngfw.ManagedIdentityTypeNone), - // PrincipalID: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaa"), - // TenantID: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // UserAssignedIdentities: map[string]*armpanngfw.AzureResourceManagerUserAssignedIdentity{ - // "key16": &armpanngfw.AzureResourceManagerUserAssignedIdentity{ - // ClientID: to.Ptr("aaaa"), - // PrincipalID: to.Ptr("aaaaaaaaaaaaaaa"), - // }, - // }, - // }, - // Properties: &armpanngfw.RulestackProperties{ - // Description: to.Ptr("aaaaaaaaaaaaaaaaaaaaa"), - // AssociatedSubscriptions: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaa")}, - // DefaultMode: to.Ptr(armpanngfw.DefaultModeIPS), - // MinAppIDVersion: to.Ptr("aaaaaaaaaaaaaaaaaaaaa"), - // PanEtag: to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c12"), - // PanLocation: to.Ptr("eastus"), - // ProvisioningState: to.Ptr(armpanngfw.ProvisioningStateSucceeded), - // Scope: to.Ptr(armpanngfw.ScopeTypeLOCAL), - // SecurityServices: &armpanngfw.SecurityServices{ - // AntiSpywareProfile: to.Ptr("aaaaaaaaaa"), - // AntiVirusProfile: to.Ptr("aaaaaaaaaaaaaaaaaaaaaa"), - // DNSSubscription: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // FileBlockingProfile: to.Ptr("aaaaa"), - // OutboundTrustCertificate: to.Ptr("aaaaaa"), - // OutboundUnTrustCertificate: to.Ptr("aaaaaaaa"), - // URLFilteringProfile: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // VulnerabilityProfile: to.Ptr("aaaaaaaaaa"), - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_ListBySubscription_MinimumSet_Gen.json -func ExampleLocalRulestacksClient_NewListBySubscriptionPager_localRulestacksListBySubscriptionMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewLocalRulestacksClient().NewListBySubscriptionPager(nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.LocalRulestackResourceListResult = armpanngfw.LocalRulestackResourceListResult{ - // Value: []*armpanngfw.LocalRulestackResource{ - // { - // ID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/lrs1"), - // Location: to.Ptr("eastus"), - // Properties: &armpanngfw.RulestackProperties{ - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_ListByResourceGroup_MaximumSet_Gen.json -func ExampleLocalRulestacksClient_NewListByResourceGroupPager_localRulestacksListByResourceGroupMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewLocalRulestacksClient().NewListByResourceGroupPager("rgopenapi", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.LocalRulestackResourceListResult = armpanngfw.LocalRulestackResourceListResult{ - // Value: []*armpanngfw.LocalRulestackResource{ - // { - // Name: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // Type: to.Ptr("aaaaaaaaaa"), - // ID: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // SystemData: &armpanngfw.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // CreatedBy: to.Ptr("praval"), - // CreatedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // LastModifiedBy: to.Ptr("praval"), - // LastModifiedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // }, - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "tagName": to.Ptr("value"), - // }, - // Identity: &armpanngfw.AzureResourceManagerManagedIdentityProperties{ - // Type: to.Ptr(armpanngfw.ManagedIdentityTypeNone), - // PrincipalID: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaa"), - // TenantID: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // UserAssignedIdentities: map[string]*armpanngfw.AzureResourceManagerUserAssignedIdentity{ - // "key16": &armpanngfw.AzureResourceManagerUserAssignedIdentity{ - // ClientID: to.Ptr("aaaa"), - // PrincipalID: to.Ptr("aaaaaaaaaaaaaaa"), - // }, - // }, - // }, - // Properties: &armpanngfw.RulestackProperties{ - // Description: to.Ptr("aaaaaaaaaaaaaaaaaaaaa"), - // AssociatedSubscriptions: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaa")}, - // DefaultMode: to.Ptr(armpanngfw.DefaultModeIPS), - // MinAppIDVersion: to.Ptr("aaaaaaaaaaaaaaaaaaaaa"), - // PanEtag: to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c12"), - // PanLocation: to.Ptr("eastus"), - // ProvisioningState: to.Ptr(armpanngfw.ProvisioningStateSucceeded), - // Scope: to.Ptr(armpanngfw.ScopeTypeLOCAL), - // SecurityServices: &armpanngfw.SecurityServices{ - // AntiSpywareProfile: to.Ptr("aaaaaaaaaa"), - // AntiVirusProfile: to.Ptr("aaaaaaaaaaaaaaaaaaaaaa"), - // DNSSubscription: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // FileBlockingProfile: to.Ptr("aaaaa"), - // OutboundTrustCertificate: to.Ptr("aaaaaa"), - // OutboundUnTrustCertificate: to.Ptr("aaaaaaaa"), - // URLFilteringProfile: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // VulnerabilityProfile: to.Ptr("aaaaaaaaaa"), - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_ListByResourceGroup_MinimumSet_Gen.json -func ExampleLocalRulestacksClient_NewListByResourceGroupPager_localRulestacksListByResourceGroupMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewLocalRulestacksClient().NewListByResourceGroupPager("rgopenapi", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.LocalRulestackResourceListResult = armpanngfw.LocalRulestackResourceListResult{ - // Value: []*armpanngfw.LocalRulestackResource{ - // { - // ID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourcegroups/rgopenapi/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/lrs1"), - // Location: to.Ptr("eastus"), - // Properties: &armpanngfw.RulestackProperties{ - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_Get_MaximumSet_Gen.json -func ExampleLocalRulestacksClient_Get_localRulestacksGetMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewLocalRulestacksClient().Get(ctx, "rgopenapi", "lrs1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.LocalRulestackResource = armpanngfw.LocalRulestackResource{ - // Name: to.Ptr("armid1"), - // Type: to.Ptr("localRulestacks"), - // ID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/firewall-rg/providers/PaloAltoNetworks.Cloudngfw/localrulestacks/armid1"), - // SystemData: &armpanngfw.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // CreatedBy: to.Ptr("praval"), - // CreatedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // LastModifiedBy: to.Ptr("praval"), - // LastModifiedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // }, - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "tagName": to.Ptr("value"), - // }, - // Identity: &armpanngfw.AzureResourceManagerManagedIdentityProperties{ - // Type: to.Ptr(armpanngfw.ManagedIdentityTypeNone), - // PrincipalID: to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c27"), - // TenantID: to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c27"), - // UserAssignedIdentities: map[string]*armpanngfw.AzureResourceManagerUserAssignedIdentity{ - // "key16": &armpanngfw.AzureResourceManagerUserAssignedIdentity{ - // ClientID: to.Ptr("aaaa"), - // PrincipalID: to.Ptr("aaaaaaaaaaaaaaa"), - // }, - // }, - // }, - // Properties: &armpanngfw.RulestackProperties{ - // Description: to.Ptr("local rulestacks"), - // AssociatedSubscriptions: []*string{ - // to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c27")}, - // DefaultMode: to.Ptr(armpanngfw.DefaultModeIPS), - // MinAppIDVersion: to.Ptr("8.5.3"), - // PanEtag: to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c12"), - // PanLocation: to.Ptr("eastus"), - // ProvisioningState: to.Ptr(armpanngfw.ProvisioningStateSucceeded), - // Scope: to.Ptr(armpanngfw.ScopeTypeLOCAL), - // SecurityServices: &armpanngfw.SecurityServices{ - // AntiSpywareProfile: to.Ptr("default"), - // AntiVirusProfile: to.Ptr("default"), - // DNSSubscription: to.Ptr("default"), - // FileBlockingProfile: to.Ptr("default"), - // OutboundTrustCertificate: to.Ptr("default"), - // OutboundUnTrustCertificate: to.Ptr("default"), - // URLFilteringProfile: to.Ptr("default"), - // VulnerabilityProfile: to.Ptr("default"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_Get_MinimumSet_Gen.json -func ExampleLocalRulestacksClient_Get_localRulestacksGetMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewLocalRulestacksClient().Get(ctx, "rgopenapi", "lrs1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.LocalRulestackResource = armpanngfw.LocalRulestackResource{ - // ID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourcegroups/rgopenapi/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/praval"), - // Location: to.Ptr("eastus"), - // Properties: &armpanngfw.RulestackProperties{ - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_CreateOrUpdate_MaximumSet_Gen.json -func ExampleLocalRulestacksClient_BeginCreateOrUpdate_localRulestacksCreateOrUpdateMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewLocalRulestacksClient().BeginCreateOrUpdate(ctx, "rgopenapi", "lrs1", armpanngfw.LocalRulestackResource{ - Location: to.Ptr("eastus"), - Tags: map[string]*string{ - "tagName": to.Ptr("value"), - }, - Identity: &armpanngfw.AzureResourceManagerManagedIdentityProperties{ - Type: to.Ptr(armpanngfw.ManagedIdentityTypeNone), - UserAssignedIdentities: map[string]*armpanngfw.AzureResourceManagerUserAssignedIdentity{ - "key16": { - ClientID: to.Ptr("aaaa"), - PrincipalID: to.Ptr("aaaaaaaaaaaaaaa"), - }, - }, - }, - Properties: &armpanngfw.RulestackProperties{ - Description: to.Ptr("local rulestacks"), - AssociatedSubscriptions: []*string{ - to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c27")}, - DefaultMode: to.Ptr(armpanngfw.DefaultModeIPS), - MinAppIDVersion: to.Ptr("8.5.3"), - PanEtag: to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c12"), - PanLocation: to.Ptr("eastus"), - ProvisioningState: to.Ptr(armpanngfw.ProvisioningStateAccepted), - Scope: to.Ptr(armpanngfw.ScopeTypeLOCAL), - SecurityServices: &armpanngfw.SecurityServices{ - AntiSpywareProfile: to.Ptr("default"), - AntiVirusProfile: to.Ptr("default"), - DNSSubscription: to.Ptr("default"), - FileBlockingProfile: to.Ptr("default"), - OutboundTrustCertificate: to.Ptr("default"), - OutboundUnTrustCertificate: to.Ptr("default"), - URLFilteringProfile: to.Ptr("default"), - VulnerabilityProfile: to.Ptr("default"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.LocalRulestackResource = armpanngfw.LocalRulestackResource{ - // Name: to.Ptr("armid1"), - // Type: to.Ptr("localRulestacks"), - // ID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/firewall-rg/providers/PaloAltoNetworks.Cloudngfw/localrulestacks/armid1"), - // SystemData: &armpanngfw.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // CreatedBy: to.Ptr("praval"), - // CreatedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // LastModifiedBy: to.Ptr("praval"), - // LastModifiedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // }, - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "tagName": to.Ptr("value"), - // }, - // Identity: &armpanngfw.AzureResourceManagerManagedIdentityProperties{ - // Type: to.Ptr(armpanngfw.ManagedIdentityTypeNone), - // PrincipalID: to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c27"), - // TenantID: to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c27"), - // UserAssignedIdentities: map[string]*armpanngfw.AzureResourceManagerUserAssignedIdentity{ - // "key16": &armpanngfw.AzureResourceManagerUserAssignedIdentity{ - // ClientID: to.Ptr("aaaa"), - // PrincipalID: to.Ptr("aaaaaaaaaaaaaaa"), - // }, - // }, - // }, - // Properties: &armpanngfw.RulestackProperties{ - // Description: to.Ptr("local rulestacks"), - // AssociatedSubscriptions: []*string{ - // to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c27")}, - // DefaultMode: to.Ptr(armpanngfw.DefaultModeIPS), - // MinAppIDVersion: to.Ptr("8.5.3"), - // PanEtag: to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c12"), - // PanLocation: to.Ptr("eastus"), - // ProvisioningState: to.Ptr(armpanngfw.ProvisioningStateSucceeded), - // Scope: to.Ptr(armpanngfw.ScopeTypeLOCAL), - // SecurityServices: &armpanngfw.SecurityServices{ - // AntiSpywareProfile: to.Ptr("default"), - // AntiVirusProfile: to.Ptr("default"), - // DNSSubscription: to.Ptr("default"), - // FileBlockingProfile: to.Ptr("default"), - // OutboundTrustCertificate: to.Ptr("default"), - // OutboundUnTrustCertificate: to.Ptr("default"), - // URLFilteringProfile: to.Ptr("default"), - // VulnerabilityProfile: to.Ptr("default"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_CreateOrUpdate_MinimumSet_Gen.json -func ExampleLocalRulestacksClient_BeginCreateOrUpdate_localRulestacksCreateOrUpdateMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewLocalRulestacksClient().BeginCreateOrUpdate(ctx, "rgopenapi", "lrs1", armpanngfw.LocalRulestackResource{ - Location: to.Ptr("eastus"), - Properties: &armpanngfw.RulestackProperties{}, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.LocalRulestackResource = armpanngfw.LocalRulestackResource{ - // ID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourcegroups/rgopenapi/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/praval"), - // Location: to.Ptr("eastus"), - // Properties: &armpanngfw.RulestackProperties{ - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_Update_MaximumSet_Gen.json -func ExampleLocalRulestacksClient_Update_localRulestacksUpdateMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewLocalRulestacksClient().Update(ctx, "rgopenapi", "lrs1", armpanngfw.LocalRulestackResourceUpdate{ - Identity: &armpanngfw.AzureResourceManagerManagedIdentityProperties{ - Type: to.Ptr(armpanngfw.ManagedIdentityTypeNone), - UserAssignedIdentities: map[string]*armpanngfw.AzureResourceManagerUserAssignedIdentity{ - "key16": { - ClientID: to.Ptr("aaaa"), - PrincipalID: to.Ptr("aaaaaaaaaaaaaaa"), - }, - }, - }, - Properties: &armpanngfw.LocalRulestackResourceUpdateProperties{ - Description: to.Ptr("local rulestacks"), - AssociatedSubscriptions: []*string{ - to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c27")}, - DefaultMode: to.Ptr(armpanngfw.DefaultModeIPS), - MinAppIDVersion: to.Ptr("8.5.3"), - PanEtag: to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c12"), - PanLocation: to.Ptr("eastus"), - Scope: to.Ptr(armpanngfw.ScopeTypeLOCAL), - SecurityServices: &armpanngfw.SecurityServices{ - AntiSpywareProfile: to.Ptr("default"), - AntiVirusProfile: to.Ptr("default"), - DNSSubscription: to.Ptr("default"), - FileBlockingProfile: to.Ptr("default"), - OutboundTrustCertificate: to.Ptr("default"), - OutboundUnTrustCertificate: to.Ptr("default"), - URLFilteringProfile: to.Ptr("default"), - VulnerabilityProfile: to.Ptr("default"), - }, - }, - Tags: map[string]*string{ - "tagName": to.Ptr("value"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.LocalRulestackResource = armpanngfw.LocalRulestackResource{ - // Name: to.Ptr("armid1"), - // Type: to.Ptr("localRulestacks"), - // ID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/firewall-rg/providers/PaloAltoNetworks.Cloudngfw/localrulestacks/armid1"), - // SystemData: &armpanngfw.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // CreatedBy: to.Ptr("praval"), - // CreatedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // LastModifiedBy: to.Ptr("praval"), - // LastModifiedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // }, - // Location: to.Ptr("eastus"), - // Tags: map[string]*string{ - // "tagName": to.Ptr("value"), - // }, - // Identity: &armpanngfw.AzureResourceManagerManagedIdentityProperties{ - // Type: to.Ptr(armpanngfw.ManagedIdentityTypeNone), - // PrincipalID: to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c27"), - // TenantID: to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c27"), - // UserAssignedIdentities: map[string]*armpanngfw.AzureResourceManagerUserAssignedIdentity{ - // "key16": &armpanngfw.AzureResourceManagerUserAssignedIdentity{ - // ClientID: to.Ptr("aaaa"), - // PrincipalID: to.Ptr("aaaaaaaaaaaaaaa"), - // }, - // }, - // }, - // Properties: &armpanngfw.RulestackProperties{ - // Description: to.Ptr("local rulestacks"), - // AssociatedSubscriptions: []*string{ - // to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c27")}, - // DefaultMode: to.Ptr(armpanngfw.DefaultModeIPS), - // MinAppIDVersion: to.Ptr("8.5.3"), - // PanEtag: to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c12"), - // PanLocation: to.Ptr("eastus"), - // ProvisioningState: to.Ptr(armpanngfw.ProvisioningStateSucceeded), - // Scope: to.Ptr(armpanngfw.ScopeTypeLOCAL), - // SecurityServices: &armpanngfw.SecurityServices{ - // AntiSpywareProfile: to.Ptr("default"), - // AntiVirusProfile: to.Ptr("default"), - // DNSSubscription: to.Ptr("default"), - // FileBlockingProfile: to.Ptr("default"), - // OutboundTrustCertificate: to.Ptr("default"), - // OutboundUnTrustCertificate: to.Ptr("default"), - // URLFilteringProfile: to.Ptr("default"), - // VulnerabilityProfile: to.Ptr("default"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_Update_MinimumSet_Gen.json -func ExampleLocalRulestacksClient_Update_localRulestacksUpdateMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewLocalRulestacksClient().Update(ctx, "rgopenapi", "lrs1", armpanngfw.LocalRulestackResourceUpdate{}, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.LocalRulestackResource = armpanngfw.LocalRulestackResource{ - // Location: to.Ptr("eastus"), - // Properties: &armpanngfw.RulestackProperties{ - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_Delete_MaximumSet_Gen.json -func ExampleLocalRulestacksClient_BeginDelete_localRulestacksDeleteMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewLocalRulestacksClient().BeginDelete(ctx, "rgopenapi", "lrs1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_Delete_MinimumSet_Gen.json -func ExampleLocalRulestacksClient_BeginDelete_localRulestacksDeleteMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewLocalRulestacksClient().BeginDelete(ctx, "rgopenapi", "lrs1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_commit_MaximumSet_Gen.json -func ExampleLocalRulestacksClient_BeginCommit_localRulestacksCommitMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewLocalRulestacksClient().BeginCommit(ctx, "rgopenapi", "lrs1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_commit_MinimumSet_Gen.json -func ExampleLocalRulestacksClient_BeginCommit_localRulestacksCommitMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewLocalRulestacksClient().BeginCommit(ctx, "rgopenapi", "lrs1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_getChangeLog_MaximumSet_Gen.json -func ExampleLocalRulestacksClient_GetChangeLog_localRulestacksGetChangeLogMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewLocalRulestacksClient().GetChangeLog(ctx, "rgopenapi", "lrs1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Changelog = armpanngfw.Changelog{ - // Changes: []*string{ - // to.Ptr("aaaa")}, - // LastCommitted: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_getChangeLog_MinimumSet_Gen.json -func ExampleLocalRulestacksClient_GetChangeLog_localRulestacksGetChangeLogMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewLocalRulestacksClient().GetChangeLog(ctx, "rgopenapi", "lrs1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Changelog = armpanngfw.Changelog{ - // Changes: []*string{ - // to.Ptr("aaaa")}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_getSupportInfo_MaximumSet_Gen.json -func ExampleLocalRulestacksClient_GetSupportInfo_localRulestacksGetSupportInfoMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewLocalRulestacksClient().GetSupportInfo(ctx, "rgopenapi", "lrs1", &armpanngfw.LocalRulestacksClientGetSupportInfoOptions{Email: to.Ptr("user1@domain.com")}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SupportInfo = armpanngfw.SupportInfo{ - // AccountID: to.Ptr("3cg5b439-294d-4c25-b0b2-ef649e0g6d38"), - // AccountRegistered: to.Ptr(armpanngfw.BooleanEnumTRUE), - // FreeTrial: to.Ptr(armpanngfw.BooleanEnumTRUE), - // FreeTrialCreditLeft: to.Ptr[int32](10), - // FreeTrialDaysLeft: to.Ptr[int32](1), - // HelpURL: to.Ptr("https://ssopreview.paloaltonetworks.com/home/bookmark/0oa4ao61shG4rd3Ub1d7/2557"), - // ProductSerial: to.Ptr("e22715cb-7e4e-4814-ad4f-ccd1417755d7"), - // ProductSKU: to.Ptr("62f63e3c-bc5a-4d68-a8a1-fcba9f526c90"), - // RegisterURL: to.Ptr("https://ssopreview.paloaltonetworks.com/home/bookmark/0oa4ao61shG4rd3Ub1d7/2557"), - // SupportURL: to.Ptr("https://ssopreview.paloaltonetworks.com/home/bookmark/0oa4ao61shG4rd3Ub1d7/2557"), - // UserDomainSupported: to.Ptr(armpanngfw.BooleanEnumTRUE), - // UserRegistered: to.Ptr(armpanngfw.BooleanEnumTRUE), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_getSupportInfo_MinimumSet_Gen.json -func ExampleLocalRulestacksClient_GetSupportInfo_localRulestacksGetSupportInfoMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewLocalRulestacksClient().GetSupportInfo(ctx, "rgopenapi", "lrs1", &armpanngfw.LocalRulestacksClientGetSupportInfoOptions{Email: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SupportInfo = armpanngfw.SupportInfo{ - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_listAdvancedSecurityObjects_MaximumSet_Gen.json -func ExampleLocalRulestacksClient_ListAdvancedSecurityObjects_localRulestacksListAdvancedSecurityObjectsMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewLocalRulestacksClient().ListAdvancedSecurityObjects(ctx, "rgopenapi", "lrs1", armpanngfw.AdvSecurityObjectTypeEnum("localRulestacks"), &armpanngfw.LocalRulestacksClientListAdvancedSecurityObjectsOptions{Skip: to.Ptr("a6a321"), - Top: to.Ptr[int32](20), - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.AdvSecurityObjectListResponse = armpanngfw.AdvSecurityObjectListResponse{ - // Value: &armpanngfw.AdvSecurityObjectModel{ - // Type: to.Ptr("localRulestacks"), - // Entry: []*armpanngfw.NameDescriptionObject{ - // { - // Name: to.Ptr("aaaaaaaaaa"), - // Description: to.Ptr("aaaaaaaaaaaa"), - // }}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_listAdvancedSecurityObjects_MinimumSet_Gen.json -func ExampleLocalRulestacksClient_ListAdvancedSecurityObjects_localRulestacksListAdvancedSecurityObjectsMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewLocalRulestacksClient().ListAdvancedSecurityObjects(ctx, "rgopenapi", "lrs1", armpanngfw.AdvSecurityObjectTypeEnum("localRulestacks"), &armpanngfw.LocalRulestacksClientListAdvancedSecurityObjectsOptions{Skip: nil, - Top: nil, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.AdvSecurityObjectListResponse = armpanngfw.AdvSecurityObjectListResponse{ - // Value: &armpanngfw.AdvSecurityObjectModel{ - // Entry: []*armpanngfw.NameDescriptionObject{ - // { - // Name: to.Ptr("aaaaaaaaaa"), - // }}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_listAppIds_MaximumSet_Gen.json -func ExampleLocalRulestacksClient_ListAppIDs_localRulestacksListAppIdsMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewLocalRulestacksClient().ListAppIDs(ctx, "rgopenapi", "lrs1", &armpanngfw.LocalRulestacksClientListAppIDsOptions{AppIDVersion: to.Ptr("8543"), - AppPrefix: to.Ptr("pref"), - Skip: to.Ptr("a6a321"), - Top: to.Ptr[int32](20), - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ListAppIDResponse = armpanngfw.ListAppIDResponse{ - // Value: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaaaaaa")}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_listAppIds_MinimumSet_Gen.json -func ExampleLocalRulestacksClient_ListAppIDs_localRulestacksListAppIdsMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewLocalRulestacksClient().ListAppIDs(ctx, "rgopenapi", "lrs1", &armpanngfw.LocalRulestacksClientListAppIDsOptions{AppIDVersion: nil, - AppPrefix: nil, - Skip: nil, - Top: nil, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ListAppIDResponse = armpanngfw.ListAppIDResponse{ - // Value: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaaaaaa")}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_listCountries_MaximumSet_Gen.json -func ExampleLocalRulestacksClient_ListCountries_localRulestacksListCountriesMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewLocalRulestacksClient().ListCountries(ctx, "rgopenapi", "lrs1", &armpanngfw.LocalRulestacksClientListCountriesOptions{Skip: to.Ptr("a6a321"), - Top: to.Ptr[int32](20), - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.CountriesResponse = armpanngfw.CountriesResponse{ - // Value: []*armpanngfw.Country{ - // { - // Description: to.Ptr("aaaaa"), - // Code: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaa"), - // }}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_listCountries_MinimumSet_Gen.json -func ExampleLocalRulestacksClient_ListCountries_localRulestacksListCountriesMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewLocalRulestacksClient().ListCountries(ctx, "rgopenapi", "lrs1", &armpanngfw.LocalRulestacksClientListCountriesOptions{Skip: nil, - Top: nil, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.CountriesResponse = armpanngfw.CountriesResponse{ - // Value: []*armpanngfw.Country{ - // { - // Code: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaa"), - // }}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_listFirewalls_MaximumSet_Gen.json -func ExampleLocalRulestacksClient_ListFirewalls_localRulestacksListFirewallsMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewLocalRulestacksClient().ListFirewalls(ctx, "rgopenapi", "lrs1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ListFirewallsResponse = armpanngfw.ListFirewallsResponse{ - // Value: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaa")}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_listFirewalls_MinimumSet_Gen.json -func ExampleLocalRulestacksClient_ListFirewalls_localRulestacksListFirewallsMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewLocalRulestacksClient().ListFirewalls(ctx, "rgopenapi", "lrs1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ListFirewallsResponse = armpanngfw.ListFirewallsResponse{ - // Value: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaa")}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_listPredefinedUrlCategories_MaximumSet_Gen.json -func ExampleLocalRulestacksClient_ListPredefinedURLCategories_localRulestacksListPredefinedUrlCategoriesMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewLocalRulestacksClient().ListPredefinedURLCategories(ctx, "rgopenapi", "lrs1", &armpanngfw.LocalRulestacksClientListPredefinedURLCategoriesOptions{Skip: to.Ptr("a6a321"), - Top: to.Ptr[int32](20), - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PredefinedURLCategoriesResponse = armpanngfw.PredefinedURLCategoriesResponse{ - // Value: []*armpanngfw.PredefinedURLCategory{ - // { - // Name: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaa"), - // Action: to.Ptr("aaaaaaa"), - // }}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_listPredefinedUrlCategories_MinimumSet_Gen.json -func ExampleLocalRulestacksClient_ListPredefinedURLCategories_localRulestacksListPredefinedUrlCategoriesMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewLocalRulestacksClient().ListPredefinedURLCategories(ctx, "rgopenapi", "lrs1", &armpanngfw.LocalRulestacksClientListPredefinedURLCategoriesOptions{Skip: nil, - Top: nil, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PredefinedURLCategoriesResponse = armpanngfw.PredefinedURLCategoriesResponse{ - // Value: []*armpanngfw.PredefinedURLCategory{ - // { - // Name: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaa"), - // Action: to.Ptr("aaaaaaa"), - // }}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_listSecurityServices_MaximumSet_Gen.json -func ExampleLocalRulestacksClient_ListSecurityServices_localRulestacksListSecurityServicesMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewLocalRulestacksClient().ListSecurityServices(ctx, "rgopenapi", "lrs1", armpanngfw.SecurityServicesTypeEnum("localRulestacks"), &armpanngfw.LocalRulestacksClientListSecurityServicesOptions{Skip: to.Ptr("a6a321"), - Top: to.Ptr[int32](20), - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SecurityServicesResponse = armpanngfw.SecurityServicesResponse{ - // Value: &armpanngfw.SecurityServicesTypeList{ - // Type: to.Ptr("localRulestacks"), - // Entry: []*armpanngfw.NameDescriptionObject{ - // { - // Name: to.Ptr("aaaaaaaaaa"), - // Description: to.Ptr("aaaaaaaaaaaa"), - // }}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_listSecurityServices_MinimumSet_Gen.json -func ExampleLocalRulestacksClient_ListSecurityServices_localRulestacksListSecurityServicesMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewLocalRulestacksClient().ListSecurityServices(ctx, "rgopenapi", "lrs1", armpanngfw.SecurityServicesTypeEnum("localRulestacks"), &armpanngfw.LocalRulestacksClientListSecurityServicesOptions{Skip: nil, - Top: nil, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SecurityServicesResponse = armpanngfw.SecurityServicesResponse{ - // Value: &armpanngfw.SecurityServicesTypeList{ - // Entry: []*armpanngfw.NameDescriptionObject{ - // { - // Name: to.Ptr("aaaaaaaaaa"), - // }}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_revert_MaximumSet_Gen.json -func ExampleLocalRulestacksClient_Revert_localRulestacksRevertMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewLocalRulestacksClient().Revert(ctx, "rgopenapi", "lrs1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/LocalRulestacks_revert_MinimumSet_Gen.json -func ExampleLocalRulestacksClient_Revert_localRulestacksRevertMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewLocalRulestacksClient().Revert(ctx, "rgopenapi", "lrs1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/operations_client_example_test.go b/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/operations_client_example_test.go deleted file mode 100644 index e2b9dff810bb..000000000000 --- a/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/operations_client_example_test.go +++ /dev/null @@ -1,85 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// 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. -// DO NOT EDIT. - -package armpanngfw_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Operations_List_MaximumSet_Gen.json -func ExampleOperationsClient_NewListPager_operationsListMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewOperationsClient().NewListPager(nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.OperationListResult = armpanngfw.OperationListResult{ - // Value: []*armpanngfw.Operation{ - // { - // Name: to.Ptr("aaa"), - // ActionType: to.Ptr(armpanngfw.ActionTypeInternal), - // Display: &armpanngfw.OperationDisplay{ - // Description: to.Ptr("aaaaaaaa"), - // Operation: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaa"), - // Provider: to.Ptr("aaaaaaaaaaa"), - // Resource: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // }, - // IsDataAction: to.Ptr(true), - // Origin: to.Ptr(armpanngfw.OriginUser), - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/Operations_List_MinimumSet_Gen.json -func ExampleOperationsClient_NewListPager_operationsListMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewOperationsClient().NewListPager(nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.OperationListResult = armpanngfw.OperationListResult{ - // } - } -} diff --git a/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/postrules_client_example_test.go b/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/postrules_client_example_test.go deleted file mode 100644 index 70d6be251a30..000000000000 --- a/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/postrules_client_example_test.go +++ /dev/null @@ -1,629 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// 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. -// DO NOT EDIT. - -package armpanngfw_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PostRules_List_MaximumSet_Gen.json -func ExamplePostRulesClient_NewListPager_postRulesListMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewPostRulesClient().NewListPager("lrs1", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.PostRulesResourceListResult = armpanngfw.PostRulesResourceListResult{ - // Value: []*armpanngfw.PostRulesResource{ - // { - // Name: to.Ptr("aaaaaaaaaa"), - // Type: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // ID: to.Ptr("aaaaaaaaaaaaaaaaaa"), - // SystemData: &armpanngfw.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // CreatedBy: to.Ptr("praval"), - // CreatedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // LastModifiedBy: to.Ptr("praval"), - // LastModifiedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // }, - // Properties: &armpanngfw.RuleEntry{ - // Description: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // ActionType: to.Ptr(armpanngfw.ActionEnumAllow), - // Applications: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")}, - // AuditComment: to.Ptr("aaa"), - // Category: &armpanngfw.Category{ - // Feeds: []*string{ - // to.Ptr("aaaaaaaaaaaa")}, - // URLCustom: []*string{ - // to.Ptr("aaaaa")}, - // }, - // DecryptionRuleType: to.Ptr(armpanngfw.DecryptionRuleTypeEnumSSLOutboundInspection), - // Destination: &armpanngfw.DestinationAddr{ - // Cidrs: []*string{ - // to.Ptr("aaaaaaa")}, - // Countries: []*string{ - // to.Ptr("aaaaaaaaaaaaaa")}, - // Feeds: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaa")}, - // FqdnLists: []*string{ - // to.Ptr("aaaaaaaaaaaaa")}, - // PrefixLists: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")}, - // }, - // EnableLogging: to.Ptr(armpanngfw.StateEnumDISABLED), - // Etag: to.Ptr("aaaaaaaaaaaaaaaaaaaa"), - // InboundInspectionCertificate: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // NegateDestination: to.Ptr(armpanngfw.BooleanEnumTRUE), - // NegateSource: to.Ptr(armpanngfw.BooleanEnumTRUE), - // Priority: to.Ptr[int32](24), - // ProtocolPortList: []*string{ - // to.Ptr("aaaaaaaaaaaa")}, - // ProvisioningState: to.Ptr(armpanngfw.ProvisioningStateSucceeded), - // RuleName: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaa"), - // RuleState: to.Ptr(armpanngfw.StateEnumDISABLED), - // Source: &armpanngfw.SourceAddr{ - // Cidrs: []*string{ - // to.Ptr("aaa")}, - // Countries: []*string{ - // to.Ptr("aaaaa")}, - // Feeds: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaa")}, - // PrefixLists: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaaa")}, - // }, - // Tags: []*armpanngfw.TagInfo{ - // { - // Key: to.Ptr("keyName"), - // Value: to.Ptr("value"), - // }}, - // Protocol: to.Ptr("aaaa"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PostRules_List_MinimumSet_Gen.json -func ExamplePostRulesClient_NewListPager_postRulesListMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewPostRulesClient().NewListPager("lrs1", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.PostRulesResourceListResult = armpanngfw.PostRulesResourceListResult{ - // Value: []*armpanngfw.PostRulesResource{ - // { - // ID: to.Ptr("/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/lrs1/postrules/1"), - // Properties: &armpanngfw.RuleEntry{ - // RuleName: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaa"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PostRules_Get_MaximumSet_Gen.json -func ExamplePostRulesClient_Get_postRulesGetMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPostRulesClient().Get(ctx, "lrs1", "1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PostRulesResource = armpanngfw.PostRulesResource{ - // Name: to.Ptr("aaaaaaaaaa"), - // Type: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // ID: to.Ptr("aaaaaaaaaaaaaaaaaa"), - // SystemData: &armpanngfw.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // CreatedBy: to.Ptr("praval"), - // CreatedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // LastModifiedBy: to.Ptr("praval"), - // LastModifiedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // }, - // Properties: &armpanngfw.RuleEntry{ - // Description: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // ActionType: to.Ptr(armpanngfw.ActionEnumAllow), - // Applications: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")}, - // AuditComment: to.Ptr("aaa"), - // Category: &armpanngfw.Category{ - // Feeds: []*string{ - // to.Ptr("aaaaaaaaaaaa")}, - // URLCustom: []*string{ - // to.Ptr("aaaaa")}, - // }, - // DecryptionRuleType: to.Ptr(armpanngfw.DecryptionRuleTypeEnumSSLOutboundInspection), - // Destination: &armpanngfw.DestinationAddr{ - // Cidrs: []*string{ - // to.Ptr("aaaaaaa")}, - // Countries: []*string{ - // to.Ptr("aaaaaaaaaaaaaa")}, - // Feeds: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaa")}, - // FqdnLists: []*string{ - // to.Ptr("aaaaaaaaaaaaa")}, - // PrefixLists: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")}, - // }, - // EnableLogging: to.Ptr(armpanngfw.StateEnumDISABLED), - // Etag: to.Ptr("aaaaaaaaaaaaaaaaaaaa"), - // InboundInspectionCertificate: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // NegateDestination: to.Ptr(armpanngfw.BooleanEnumTRUE), - // NegateSource: to.Ptr(armpanngfw.BooleanEnumTRUE), - // Priority: to.Ptr[int32](24), - // ProtocolPortList: []*string{ - // to.Ptr("aaaaaaaaaaaa")}, - // ProvisioningState: to.Ptr(armpanngfw.ProvisioningStateSucceeded), - // RuleName: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaa"), - // RuleState: to.Ptr(armpanngfw.StateEnumDISABLED), - // Source: &armpanngfw.SourceAddr{ - // Cidrs: []*string{ - // to.Ptr("aaa")}, - // Countries: []*string{ - // to.Ptr("aaaaa")}, - // Feeds: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaa")}, - // PrefixLists: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaaa")}, - // }, - // Tags: []*armpanngfw.TagInfo{ - // { - // Key: to.Ptr("keyName"), - // Value: to.Ptr("value"), - // }}, - // Protocol: to.Ptr("aaaa"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PostRules_Get_MinimumSet_Gen.json -func ExamplePostRulesClient_Get_postRulesGetMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPostRulesClient().Get(ctx, "lrs1", "1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PostRulesResource = armpanngfw.PostRulesResource{ - // ID: to.Ptr("/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/lrs1/postrules/1"), - // Properties: &armpanngfw.RuleEntry{ - // RuleName: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaa"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PostRules_CreateOrUpdate_MaximumSet_Gen.json -func ExamplePostRulesClient_BeginCreateOrUpdate_postRulesCreateOrUpdateMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewPostRulesClient().BeginCreateOrUpdate(ctx, "lrs1", "1", armpanngfw.PostRulesResource{ - Properties: &armpanngfw.RuleEntry{ - Description: to.Ptr("description of post rule"), - ActionType: to.Ptr(armpanngfw.ActionEnumAllow), - Applications: []*string{ - to.Ptr("app1")}, - AuditComment: to.Ptr("example comment"), - Category: &armpanngfw.Category{ - Feeds: []*string{ - to.Ptr("feed")}, - URLCustom: []*string{ - to.Ptr("https://microsoft.com")}, - }, - DecryptionRuleType: to.Ptr(armpanngfw.DecryptionRuleTypeEnumSSLOutboundInspection), - Destination: &armpanngfw.DestinationAddr{ - Cidrs: []*string{ - to.Ptr("1.0.0.1/10")}, - Countries: []*string{ - to.Ptr("India")}, - Feeds: []*string{ - to.Ptr("feed")}, - FqdnLists: []*string{ - to.Ptr("FQDN1")}, - PrefixLists: []*string{ - to.Ptr("PL1")}, - }, - EnableLogging: to.Ptr(armpanngfw.StateEnumDISABLED), - Etag: to.Ptr("c18e6eef-ba3e-49ee-8a85-2b36c863a9d0"), - InboundInspectionCertificate: to.Ptr("cert1"), - NegateDestination: to.Ptr(armpanngfw.BooleanEnumTRUE), - NegateSource: to.Ptr(armpanngfw.BooleanEnumTRUE), - ProtocolPortList: []*string{ - to.Ptr("80")}, - ProvisioningState: to.Ptr(armpanngfw.ProvisioningStateAccepted), - RuleName: to.Ptr("postRule1"), - RuleState: to.Ptr(armpanngfw.StateEnumDISABLED), - Source: &armpanngfw.SourceAddr{ - Cidrs: []*string{ - to.Ptr("1.0.0.1/10")}, - Countries: []*string{ - to.Ptr("India")}, - Feeds: []*string{ - to.Ptr("feed")}, - PrefixLists: []*string{ - to.Ptr("PL1")}, - }, - Tags: []*armpanngfw.TagInfo{ - { - Key: to.Ptr("keyName"), - Value: to.Ptr("value"), - }}, - Protocol: to.Ptr("HTTP"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PostRulesResource = armpanngfw.PostRulesResource{ - // Name: to.Ptr("aaaaaaaaaa"), - // Type: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // ID: to.Ptr("aaaaaaaaaaaaaaaaaa"), - // SystemData: &armpanngfw.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // CreatedBy: to.Ptr("praval"), - // CreatedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // LastModifiedBy: to.Ptr("praval"), - // LastModifiedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // }, - // Properties: &armpanngfw.RuleEntry{ - // Description: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // ActionType: to.Ptr(armpanngfw.ActionEnumAllow), - // Applications: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")}, - // AuditComment: to.Ptr("aaa"), - // Category: &armpanngfw.Category{ - // Feeds: []*string{ - // to.Ptr("aaaaaaaaaaaa")}, - // URLCustom: []*string{ - // to.Ptr("aaaaa")}, - // }, - // DecryptionRuleType: to.Ptr(armpanngfw.DecryptionRuleTypeEnumSSLOutboundInspection), - // Destination: &armpanngfw.DestinationAddr{ - // Cidrs: []*string{ - // to.Ptr("aaaaaaa")}, - // Countries: []*string{ - // to.Ptr("aaaaaaaaaaaaaa")}, - // Feeds: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaa")}, - // FqdnLists: []*string{ - // to.Ptr("aaaaaaaaaaaaa")}, - // PrefixLists: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")}, - // }, - // EnableLogging: to.Ptr(armpanngfw.StateEnumDISABLED), - // Etag: to.Ptr("aaaaaaaaaaaaaaaaaaaa"), - // InboundInspectionCertificate: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // NegateDestination: to.Ptr(armpanngfw.BooleanEnumTRUE), - // NegateSource: to.Ptr(armpanngfw.BooleanEnumTRUE), - // Priority: to.Ptr[int32](24), - // ProtocolPortList: []*string{ - // to.Ptr("aaaaaaaaaaaa")}, - // ProvisioningState: to.Ptr(armpanngfw.ProvisioningStateSucceeded), - // RuleName: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaa"), - // RuleState: to.Ptr(armpanngfw.StateEnumDISABLED), - // Source: &armpanngfw.SourceAddr{ - // Cidrs: []*string{ - // to.Ptr("aaa")}, - // Countries: []*string{ - // to.Ptr("aaaaa")}, - // Feeds: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaa")}, - // PrefixLists: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaaa")}, - // }, - // Tags: []*armpanngfw.TagInfo{ - // { - // Key: to.Ptr("keyName"), - // Value: to.Ptr("value"), - // }}, - // Protocol: to.Ptr("aaaa"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PostRules_CreateOrUpdate_MinimumSet_Gen.json -func ExamplePostRulesClient_BeginCreateOrUpdate_postRulesCreateOrUpdateMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewPostRulesClient().BeginCreateOrUpdate(ctx, "lrs1", "1", armpanngfw.PostRulesResource{ - Properties: &armpanngfw.RuleEntry{ - RuleName: to.Ptr("postRule1"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PostRulesResource = armpanngfw.PostRulesResource{ - // ID: to.Ptr("/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/lrs1/postrules/1"), - // Properties: &armpanngfw.RuleEntry{ - // RuleName: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaa"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PostRules_Delete_MaximumSet_Gen.json -func ExamplePostRulesClient_BeginDelete_postRulesDeleteMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewPostRulesClient().BeginDelete(ctx, "lrs1", "1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PostRules_Delete_MinimumSet_Gen.json -func ExamplePostRulesClient_BeginDelete_postRulesDeleteMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewPostRulesClient().BeginDelete(ctx, "lrs1", "1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PostRules_getCounters_MaximumSet_Gen.json -func ExamplePostRulesClient_GetCounters_postRulesGetCountersMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPostRulesClient().GetCounters(ctx, "lrs1", "1", &armpanngfw.PostRulesClientGetCountersOptions{FirewallName: to.Ptr("firewall1")}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.RuleCounter = armpanngfw.RuleCounter{ - // AppSeen: &armpanngfw.AppSeenData{ - // AppSeenList: []*armpanngfw.AppSeenInfo{ - // { - // Category: to.Ptr("aaaaaaaaaaaaaaaaaaa"), - // Risk: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaa"), - // StandardPorts: to.Ptr("aaaaaaaaaaaaaaaaaa"), - // SubCategory: to.Ptr("aaaaaaaaaaaaaaaaa"), - // Tag: to.Ptr("aaaaaaaaaa"), - // Technology: to.Ptr("aaaaaaaaaaaaaaaaaaaa"), - // Title: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // }}, - // Count: to.Ptr[int32](13), - // }, - // FirewallName: to.Ptr("aaaaaaaaaaaaaaaaaa"), - // HitCount: to.Ptr[int32](20), - // LastUpdatedTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // Priority: to.Ptr("aaaaaaaaaaaaaaaaaaaa"), - // RequestTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // RuleListName: to.Ptr("aaaaaaaaaaaaaaaaaaa"), - // RuleName: to.Ptr("aaaa"), - // RuleStackName: to.Ptr("aaaaaaaaaaaaaaaaa"), - // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PostRules_getCounters_MinimumSet_Gen.json -func ExamplePostRulesClient_GetCounters_postRulesGetCountersMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPostRulesClient().GetCounters(ctx, "lrs1", "1", &armpanngfw.PostRulesClientGetCountersOptions{FirewallName: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.RuleCounter = armpanngfw.RuleCounter{ - // Priority: to.Ptr("aaaaaaaaaaaaaaaaaaaa"), - // RuleName: to.Ptr("aaaa"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PostRules_refreshCounters_MaximumSet_Gen.json -func ExamplePostRulesClient_RefreshCounters_postRulesRefreshCountersMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewPostRulesClient().RefreshCounters(ctx, "lrs1", "1", &armpanngfw.PostRulesClientRefreshCountersOptions{FirewallName: to.Ptr("firewall1")}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PostRules_refreshCounters_MinimumSet_Gen.json -func ExamplePostRulesClient_RefreshCounters_postRulesRefreshCountersMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewPostRulesClient().RefreshCounters(ctx, "lrs1", "1", &armpanngfw.PostRulesClientRefreshCountersOptions{FirewallName: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PostRules_resetCounters_MaximumSet_Gen.json -func ExamplePostRulesClient_ResetCounters_postRulesResetCountersMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPostRulesClient().ResetCounters(ctx, "lrs1", "1", &armpanngfw.PostRulesClientResetCountersOptions{FirewallName: to.Ptr("firewall1")}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.RuleCounterReset = armpanngfw.RuleCounterReset{ - // FirewallName: to.Ptr("aaaaaaaaaaaaaaaaaa"), - // Priority: to.Ptr("aaaaaaa"), - // RuleListName: to.Ptr("aaaaa"), - // RuleName: to.Ptr("aaaaa"), - // RuleStackName: to.Ptr("aa"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PostRules_resetCounters_MinimumSet_Gen.json -func ExamplePostRulesClient_ResetCounters_postRulesResetCountersMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPostRulesClient().ResetCounters(ctx, "lrs1", "1", &armpanngfw.PostRulesClientResetCountersOptions{FirewallName: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.RuleCounterReset = armpanngfw.RuleCounterReset{ - // } -} diff --git a/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/prefixlistglobalrulestack_client_example_test.go b/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/prefixlistglobalrulestack_client_example_test.go deleted file mode 100644 index e5b66dd44d85..000000000000 --- a/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/prefixlistglobalrulestack_client_example_test.go +++ /dev/null @@ -1,303 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// 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. -// DO NOT EDIT. - -package armpanngfw_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PrefixListGlobalRulestack_List_MaximumSet_Gen.json -func ExamplePrefixListGlobalRulestackClient_NewListPager_prefixListGlobalRulestackListMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewPrefixListGlobalRulestackClient().NewListPager("praval", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.PrefixListGlobalRulestackResourceListResult = armpanngfw.PrefixListGlobalRulestackResourceListResult{ - // Value: []*armpanngfw.PrefixListGlobalRulestackResource{ - // { - // Name: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // Type: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // ID: to.Ptr("aaaaaaaaaaaaaaaaaa"), - // SystemData: &armpanngfw.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // CreatedBy: to.Ptr("praval"), - // CreatedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // LastModifiedBy: to.Ptr("praval"), - // LastModifiedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // }, - // Properties: &armpanngfw.PrefixObject{ - // Description: to.Ptr("aaaaaaaaaaaaaaaaaaa"), - // AuditComment: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // Etag: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaa"), - // PrefixList: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaa")}, - // ProvisioningState: to.Ptr(armpanngfw.ProvisioningStateSucceeded), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PrefixListGlobalRulestack_List_MinimumSet_Gen.json -func ExamplePrefixListGlobalRulestackClient_NewListPager_prefixListGlobalRulestackListMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewPrefixListGlobalRulestackClient().NewListPager("praval", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.PrefixListGlobalRulestackResourceListResult = armpanngfw.PrefixListGlobalRulestackResourceListResult{ - // Value: []*armpanngfw.PrefixListGlobalRulestackResource{ - // { - // ID: to.Ptr("/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/praval/prefixlists/prefixlists1"), - // Properties: &armpanngfw.PrefixObject{ - // PrefixList: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaa")}, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PrefixListGlobalRulestack_Get_MaximumSet_Gen.json -func ExamplePrefixListGlobalRulestackClient_Get_prefixListGlobalRulestackGetMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPrefixListGlobalRulestackClient().Get(ctx, "praval", "armid1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PrefixListGlobalRulestackResource = armpanngfw.PrefixListGlobalRulestackResource{ - // Name: to.Ptr("armid1"), - // Type: to.Ptr("certificates"), - // ID: to.Ptr("/providers/PaloAltoNetworks.Cloudngfw/globalrulestacks/armid1/certificates/armid1"), - // SystemData: &armpanngfw.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // CreatedBy: to.Ptr("praval"), - // CreatedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // LastModifiedBy: to.Ptr("praval"), - // LastModifiedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // }, - // Properties: &armpanngfw.PrefixObject{ - // Description: to.Ptr("string"), - // AuditComment: to.Ptr("comment"), - // Etag: to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c27"), - // PrefixList: []*string{ - // to.Ptr("1.0.0.0/24")}, - // ProvisioningState: to.Ptr(armpanngfw.ProvisioningStateSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PrefixListGlobalRulestack_Get_MinimumSet_Gen.json -func ExamplePrefixListGlobalRulestackClient_Get_prefixListGlobalRulestackGetMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPrefixListGlobalRulestackClient().Get(ctx, "praval", "armid1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PrefixListGlobalRulestackResource = armpanngfw.PrefixListGlobalRulestackResource{ - // ID: to.Ptr("/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/praval/prefixlists/armid1"), - // Properties: &armpanngfw.PrefixObject{ - // PrefixList: []*string{ - // to.Ptr("1.0.0.0/24")}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PrefixListGlobalRulestack_CreateOrUpdate_MaximumSet_Gen.json -func ExamplePrefixListGlobalRulestackClient_BeginCreateOrUpdate_prefixListGlobalRulestackCreateOrUpdateMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewPrefixListGlobalRulestackClient().BeginCreateOrUpdate(ctx, "praval", "armid1", armpanngfw.PrefixListGlobalRulestackResource{ - Properties: &armpanngfw.PrefixObject{ - Description: to.Ptr("string"), - AuditComment: to.Ptr("comment"), - Etag: to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c27"), - PrefixList: []*string{ - to.Ptr("1.0.0.0/24")}, - ProvisioningState: to.Ptr(armpanngfw.ProvisioningStateAccepted), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PrefixListGlobalRulestackResource = armpanngfw.PrefixListGlobalRulestackResource{ - // Name: to.Ptr("armid1"), - // Type: to.Ptr("certificates"), - // ID: to.Ptr("/providers/PaloAltoNetworks.Cloudngfw/globalrulestacks/armid1/certificates/armid1"), - // SystemData: &armpanngfw.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // CreatedBy: to.Ptr("praval"), - // CreatedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // LastModifiedBy: to.Ptr("praval"), - // LastModifiedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // }, - // Properties: &armpanngfw.PrefixObject{ - // Description: to.Ptr("string"), - // AuditComment: to.Ptr("comment"), - // Etag: to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c27"), - // PrefixList: []*string{ - // to.Ptr("1.0.0.0/24")}, - // ProvisioningState: to.Ptr(armpanngfw.ProvisioningStateSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PrefixListGlobalRulestack_CreateOrUpdate_MinimumSet_Gen.json -func ExamplePrefixListGlobalRulestackClient_BeginCreateOrUpdate_prefixListGlobalRulestackCreateOrUpdateMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewPrefixListGlobalRulestackClient().BeginCreateOrUpdate(ctx, "praval", "armid1", armpanngfw.PrefixListGlobalRulestackResource{ - Properties: &armpanngfw.PrefixObject{ - PrefixList: []*string{ - to.Ptr("1.0.0.0/24")}, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PrefixListGlobalRulestackResource = armpanngfw.PrefixListGlobalRulestackResource{ - // ID: to.Ptr("/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/praval/prefixlists/armid1"), - // Properties: &armpanngfw.PrefixObject{ - // PrefixList: []*string{ - // to.Ptr("1.0.0.0/24")}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PrefixListGlobalRulestack_Delete_MaximumSet_Gen.json -func ExamplePrefixListGlobalRulestackClient_BeginDelete_prefixListGlobalRulestackDeleteMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewPrefixListGlobalRulestackClient().BeginDelete(ctx, "praval", "armid1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PrefixListGlobalRulestack_Delete_MinimumSet_Gen.json -func ExamplePrefixListGlobalRulestackClient_BeginDelete_prefixListGlobalRulestackDeleteMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewPrefixListGlobalRulestackClient().BeginDelete(ctx, "praval", "armid1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/prefixlistlocalrulestack_client_example_test.go b/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/prefixlistlocalrulestack_client_example_test.go deleted file mode 100644 index 71dc87c5e2c5..000000000000 --- a/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/prefixlistlocalrulestack_client_example_test.go +++ /dev/null @@ -1,303 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// 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. -// DO NOT EDIT. - -package armpanngfw_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PrefixListLocalRulestack_ListByLocalRulestacks_MaximumSet_Gen.json -func ExamplePrefixListLocalRulestackClient_NewListByLocalRulestacksPager_prefixListLocalRulestackListByLocalRulestacksMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewPrefixListLocalRulestackClient().NewListByLocalRulestacksPager("rgopenapi", "lrs1", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.PrefixListResourceListResult = armpanngfw.PrefixListResourceListResult{ - // Value: []*armpanngfw.PrefixListResource{ - // { - // Name: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // Type: to.Ptr("aa"), - // ID: to.Ptr("aaa"), - // SystemData: &armpanngfw.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // CreatedBy: to.Ptr("praval"), - // CreatedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // LastModifiedBy: to.Ptr("praval"), - // LastModifiedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // }, - // Properties: &armpanngfw.PrefixObject{ - // Description: to.Ptr("aaaaaaaaaaaaaaaaaaa"), - // AuditComment: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // Etag: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaa"), - // PrefixList: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaa")}, - // ProvisioningState: to.Ptr(armpanngfw.ProvisioningStateSucceeded), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PrefixListLocalRulestack_ListByLocalRulestacks_MinimumSet_Gen.json -func ExamplePrefixListLocalRulestackClient_NewListByLocalRulestacksPager_prefixListLocalRulestackListByLocalRulestacksMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewPrefixListLocalRulestackClient().NewListByLocalRulestacksPager("rgopenapi", "lrs1", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.PrefixListResourceListResult = armpanngfw.PrefixListResourceListResult{ - // Value: []*armpanngfw.PrefixListResource{ - // { - // ID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourcegroups/rgopenapi/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/praval/prefixlists/prefixlists1"), - // Properties: &armpanngfw.PrefixObject{ - // PrefixList: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaa")}, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PrefixListLocalRulestack_Get_MaximumSet_Gen.json -func ExamplePrefixListLocalRulestackClient_Get_prefixListLocalRulestackGetMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPrefixListLocalRulestackClient().Get(ctx, "rgopenapi", "lrs1", "armid1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PrefixListResource = armpanngfw.PrefixListResource{ - // Name: to.Ptr("armid1"), - // Type: to.Ptr("certificates"), - // ID: to.Ptr("/providers/PaloAltoNetworks.Cloudngfw/globalrulestacks/armid1/certificates/armid1"), - // SystemData: &armpanngfw.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // CreatedBy: to.Ptr("praval"), - // CreatedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // LastModifiedBy: to.Ptr("praval"), - // LastModifiedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // }, - // Properties: &armpanngfw.PrefixObject{ - // Description: to.Ptr("string"), - // AuditComment: to.Ptr("comment"), - // Etag: to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c27"), - // PrefixList: []*string{ - // to.Ptr("1.0.0.0/24")}, - // ProvisioningState: to.Ptr(armpanngfw.ProvisioningStateSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PrefixListLocalRulestack_Get_MinimumSet_Gen.json -func ExamplePrefixListLocalRulestackClient_Get_prefixListLocalRulestackGetMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPrefixListLocalRulestackClient().Get(ctx, "rgopenapi", "lrs1", "armid1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PrefixListResource = armpanngfw.PrefixListResource{ - // ID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourcegroups/rgopenapi/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/praval/prefixlists/armid1"), - // Properties: &armpanngfw.PrefixObject{ - // PrefixList: []*string{ - // to.Ptr("1.0.0.0/24")}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PrefixListLocalRulestack_CreateOrUpdate_MaximumSet_Gen.json -func ExamplePrefixListLocalRulestackClient_BeginCreateOrUpdate_prefixListLocalRulestackCreateOrUpdateMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewPrefixListLocalRulestackClient().BeginCreateOrUpdate(ctx, "rgopenapi", "lrs1", "armid1", armpanngfw.PrefixListResource{ - Properties: &armpanngfw.PrefixObject{ - Description: to.Ptr("string"), - AuditComment: to.Ptr("comment"), - Etag: to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c27"), - PrefixList: []*string{ - to.Ptr("1.0.0.0/24")}, - ProvisioningState: to.Ptr(armpanngfw.ProvisioningStateAccepted), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PrefixListResource = armpanngfw.PrefixListResource{ - // Name: to.Ptr("armid1"), - // Type: to.Ptr("certificates"), - // ID: to.Ptr("/providers/PaloAltoNetworks.Cloudngfw/globalrulestacks/armid1/certificates/armid1"), - // SystemData: &armpanngfw.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // CreatedBy: to.Ptr("praval"), - // CreatedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // LastModifiedBy: to.Ptr("praval"), - // LastModifiedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // }, - // Properties: &armpanngfw.PrefixObject{ - // Description: to.Ptr("string"), - // AuditComment: to.Ptr("comment"), - // Etag: to.Ptr("2bf4a339-294d-4c25-b0b2-ef649e9f5c27"), - // PrefixList: []*string{ - // to.Ptr("1.0.0.0/24")}, - // ProvisioningState: to.Ptr(armpanngfw.ProvisioningStateSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PrefixListLocalRulestack_CreateOrUpdate_MinimumSet_Gen.json -func ExamplePrefixListLocalRulestackClient_BeginCreateOrUpdate_prefixListLocalRulestackCreateOrUpdateMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewPrefixListLocalRulestackClient().BeginCreateOrUpdate(ctx, "rgopenapi", "lrs1", "armid1", armpanngfw.PrefixListResource{ - Properties: &armpanngfw.PrefixObject{ - PrefixList: []*string{ - to.Ptr("1.0.0.0/24")}, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PrefixListResource = armpanngfw.PrefixListResource{ - // ID: to.Ptr("/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourcegroups/rgopenapi/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/praval/prefixlists/armid1"), - // Properties: &armpanngfw.PrefixObject{ - // PrefixList: []*string{ - // to.Ptr("1.0.0.0/24")}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PrefixListLocalRulestack_Delete_MaximumSet_Gen.json -func ExamplePrefixListLocalRulestackClient_BeginDelete_prefixListLocalRulestackDeleteMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewPrefixListLocalRulestackClient().BeginDelete(ctx, "rgopenapi", "lrs1", "armid1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PrefixListLocalRulestack_Delete_MinimumSet_Gen.json -func ExamplePrefixListLocalRulestackClient_BeginDelete_prefixListLocalRulestackDeleteMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewPrefixListLocalRulestackClient().BeginDelete(ctx, "rgopenapi", "lrs1", "armid1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/prerules_client_example_test.go b/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/prerules_client_example_test.go deleted file mode 100644 index 118cba83affd..000000000000 --- a/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/prerules_client_example_test.go +++ /dev/null @@ -1,629 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// 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. -// DO NOT EDIT. - -package armpanngfw_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PreRules_List_MaximumSet_Gen.json -func ExamplePreRulesClient_NewListPager_preRulesListMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewPreRulesClient().NewListPager("lrs1", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.PreRulesResourceListResult = armpanngfw.PreRulesResourceListResult{ - // Value: []*armpanngfw.PreRulesResource{ - // { - // Name: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // Type: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaa"), - // ID: to.Ptr("aaaaaaaaaaaaaaaaaaaaaa"), - // SystemData: &armpanngfw.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // CreatedBy: to.Ptr("praval"), - // CreatedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // LastModifiedBy: to.Ptr("praval"), - // LastModifiedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // }, - // Properties: &armpanngfw.RuleEntry{ - // Description: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // ActionType: to.Ptr(armpanngfw.ActionEnumAllow), - // Applications: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")}, - // AuditComment: to.Ptr("aaa"), - // Category: &armpanngfw.Category{ - // Feeds: []*string{ - // to.Ptr("aaaaaaaaaaaa")}, - // URLCustom: []*string{ - // to.Ptr("aaaaa")}, - // }, - // DecryptionRuleType: to.Ptr(armpanngfw.DecryptionRuleTypeEnumSSLOutboundInspection), - // Destination: &armpanngfw.DestinationAddr{ - // Cidrs: []*string{ - // to.Ptr("aaaaaaa")}, - // Countries: []*string{ - // to.Ptr("aaaaaaaaaaaaaa")}, - // Feeds: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaa")}, - // FqdnLists: []*string{ - // to.Ptr("aaaaaaaaaaaaa")}, - // PrefixLists: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")}, - // }, - // EnableLogging: to.Ptr(armpanngfw.StateEnumDISABLED), - // Etag: to.Ptr("aaaaaaaaaaaaaaaaaaaa"), - // InboundInspectionCertificate: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // NegateDestination: to.Ptr(armpanngfw.BooleanEnumTRUE), - // NegateSource: to.Ptr(armpanngfw.BooleanEnumTRUE), - // Priority: to.Ptr[int32](24), - // ProtocolPortList: []*string{ - // to.Ptr("aaaaaaaaaaaa")}, - // ProvisioningState: to.Ptr(armpanngfw.ProvisioningStateSucceeded), - // RuleName: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaa"), - // RuleState: to.Ptr(armpanngfw.StateEnumDISABLED), - // Source: &armpanngfw.SourceAddr{ - // Cidrs: []*string{ - // to.Ptr("aaa")}, - // Countries: []*string{ - // to.Ptr("aaaaa")}, - // Feeds: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaa")}, - // PrefixLists: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaaa")}, - // }, - // Tags: []*armpanngfw.TagInfo{ - // { - // Key: to.Ptr("keyName"), - // Value: to.Ptr("value"), - // }}, - // Protocol: to.Ptr("aaaa"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PreRules_List_MinimumSet_Gen.json -func ExamplePreRulesClient_NewListPager_preRulesListMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewPreRulesClient().NewListPager("lrs1", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.PreRulesResourceListResult = armpanngfw.PreRulesResourceListResult{ - // Value: []*armpanngfw.PreRulesResource{ - // { - // ID: to.Ptr("/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/lrs1/prerules/1"), - // Properties: &armpanngfw.RuleEntry{ - // RuleName: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaa"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PreRules_Get_MaximumSet_Gen.json -func ExamplePreRulesClient_Get_preRulesGetMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPreRulesClient().Get(ctx, "lrs1", "1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PreRulesResource = armpanngfw.PreRulesResource{ - // Name: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // Type: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaa"), - // ID: to.Ptr("aaaaaaaaaaaaaaaaaaaaaa"), - // SystemData: &armpanngfw.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // CreatedBy: to.Ptr("praval"), - // CreatedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // LastModifiedBy: to.Ptr("praval"), - // LastModifiedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // }, - // Properties: &armpanngfw.RuleEntry{ - // Description: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // ActionType: to.Ptr(armpanngfw.ActionEnumAllow), - // Applications: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")}, - // AuditComment: to.Ptr("aaa"), - // Category: &armpanngfw.Category{ - // Feeds: []*string{ - // to.Ptr("aaaaaaaaaaaa")}, - // URLCustom: []*string{ - // to.Ptr("aaaaa")}, - // }, - // DecryptionRuleType: to.Ptr(armpanngfw.DecryptionRuleTypeEnumSSLOutboundInspection), - // Destination: &armpanngfw.DestinationAddr{ - // Cidrs: []*string{ - // to.Ptr("aaaaaaa")}, - // Countries: []*string{ - // to.Ptr("aaaaaaaaaaaaaa")}, - // Feeds: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaa")}, - // FqdnLists: []*string{ - // to.Ptr("aaaaaaaaaaaaa")}, - // PrefixLists: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")}, - // }, - // EnableLogging: to.Ptr(armpanngfw.StateEnumDISABLED), - // Etag: to.Ptr("aaaaaaaaaaaaaaaaaaaa"), - // InboundInspectionCertificate: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // NegateDestination: to.Ptr(armpanngfw.BooleanEnumTRUE), - // NegateSource: to.Ptr(armpanngfw.BooleanEnumTRUE), - // Priority: to.Ptr[int32](24), - // ProtocolPortList: []*string{ - // to.Ptr("aaaaaaaaaaaa")}, - // ProvisioningState: to.Ptr(armpanngfw.ProvisioningStateSucceeded), - // RuleName: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaa"), - // RuleState: to.Ptr(armpanngfw.StateEnumDISABLED), - // Source: &armpanngfw.SourceAddr{ - // Cidrs: []*string{ - // to.Ptr("aaa")}, - // Countries: []*string{ - // to.Ptr("aaaaa")}, - // Feeds: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaa")}, - // PrefixLists: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaaa")}, - // }, - // Tags: []*armpanngfw.TagInfo{ - // { - // Key: to.Ptr("keyName"), - // Value: to.Ptr("value"), - // }}, - // Protocol: to.Ptr("aaaa"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PreRules_Get_MinimumSet_Gen.json -func ExamplePreRulesClient_Get_preRulesGetMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPreRulesClient().Get(ctx, "lrs1", "1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PreRulesResource = armpanngfw.PreRulesResource{ - // ID: to.Ptr("/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/lrs1/prerules/1"), - // Properties: &armpanngfw.RuleEntry{ - // RuleName: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaa"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PreRules_CreateOrUpdate_MaximumSet_Gen.json -func ExamplePreRulesClient_BeginCreateOrUpdate_preRulesCreateOrUpdateMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewPreRulesClient().BeginCreateOrUpdate(ctx, "lrs1", "1", armpanngfw.PreRulesResource{ - Properties: &armpanngfw.RuleEntry{ - Description: to.Ptr("description of pre rule"), - ActionType: to.Ptr(armpanngfw.ActionEnumAllow), - Applications: []*string{ - to.Ptr("app1")}, - AuditComment: to.Ptr("example comment"), - Category: &armpanngfw.Category{ - Feeds: []*string{ - to.Ptr("feed")}, - URLCustom: []*string{ - to.Ptr("https://microsoft.com")}, - }, - DecryptionRuleType: to.Ptr(armpanngfw.DecryptionRuleTypeEnumSSLOutboundInspection), - Destination: &armpanngfw.DestinationAddr{ - Cidrs: []*string{ - to.Ptr("1.0.0.1/10")}, - Countries: []*string{ - to.Ptr("India")}, - Feeds: []*string{ - to.Ptr("feed")}, - FqdnLists: []*string{ - to.Ptr("FQDN1")}, - PrefixLists: []*string{ - to.Ptr("PL1")}, - }, - EnableLogging: to.Ptr(armpanngfw.StateEnumDISABLED), - Etag: to.Ptr("c18e6eef-ba3e-49ee-8a85-2b36c863a9d0"), - InboundInspectionCertificate: to.Ptr("cert1"), - NegateDestination: to.Ptr(armpanngfw.BooleanEnumTRUE), - NegateSource: to.Ptr(armpanngfw.BooleanEnumTRUE), - ProtocolPortList: []*string{ - to.Ptr("80")}, - ProvisioningState: to.Ptr(armpanngfw.ProvisioningStateAccepted), - RuleName: to.Ptr("preRule1"), - RuleState: to.Ptr(armpanngfw.StateEnumDISABLED), - Source: &armpanngfw.SourceAddr{ - Cidrs: []*string{ - to.Ptr("1.0.0.1/10")}, - Countries: []*string{ - to.Ptr("India")}, - Feeds: []*string{ - to.Ptr("feed")}, - PrefixLists: []*string{ - to.Ptr("PL1")}, - }, - Tags: []*armpanngfw.TagInfo{ - { - Key: to.Ptr("keyName"), - Value: to.Ptr("value"), - }}, - Protocol: to.Ptr("HTTP"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PreRulesResource = armpanngfw.PreRulesResource{ - // Name: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // Type: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaa"), - // ID: to.Ptr("aaaaaaaaaaaaaaaaaaaaaa"), - // SystemData: &armpanngfw.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // CreatedBy: to.Ptr("praval"), - // CreatedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // LastModifiedBy: to.Ptr("praval"), - // LastModifiedByType: to.Ptr(armpanngfw.CreatedByTypeUser), - // }, - // Properties: &armpanngfw.RuleEntry{ - // Description: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // ActionType: to.Ptr(armpanngfw.ActionEnumAllow), - // Applications: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")}, - // AuditComment: to.Ptr("aaa"), - // Category: &armpanngfw.Category{ - // Feeds: []*string{ - // to.Ptr("aaaaaaaaaaaa")}, - // URLCustom: []*string{ - // to.Ptr("aaaaa")}, - // }, - // DecryptionRuleType: to.Ptr(armpanngfw.DecryptionRuleTypeEnumSSLOutboundInspection), - // Destination: &armpanngfw.DestinationAddr{ - // Cidrs: []*string{ - // to.Ptr("aaaaaaa")}, - // Countries: []*string{ - // to.Ptr("aaaaaaaaaaaaaa")}, - // Feeds: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaa")}, - // FqdnLists: []*string{ - // to.Ptr("aaaaaaaaaaaaa")}, - // PrefixLists: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")}, - // }, - // EnableLogging: to.Ptr(armpanngfw.StateEnumDISABLED), - // Etag: to.Ptr("aaaaaaaaaaaaaaaaaaaa"), - // InboundInspectionCertificate: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // NegateDestination: to.Ptr(armpanngfw.BooleanEnumTRUE), - // NegateSource: to.Ptr(armpanngfw.BooleanEnumTRUE), - // Priority: to.Ptr[int32](24), - // ProtocolPortList: []*string{ - // to.Ptr("aaaaaaaaaaaa")}, - // ProvisioningState: to.Ptr(armpanngfw.ProvisioningStateSucceeded), - // RuleName: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaa"), - // RuleState: to.Ptr(armpanngfw.StateEnumDISABLED), - // Source: &armpanngfw.SourceAddr{ - // Cidrs: []*string{ - // to.Ptr("aaa")}, - // Countries: []*string{ - // to.Ptr("aaaaa")}, - // Feeds: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaa")}, - // PrefixLists: []*string{ - // to.Ptr("aaaaaaaaaaaaaaaaaaaa")}, - // }, - // Tags: []*armpanngfw.TagInfo{ - // { - // Key: to.Ptr("keyName"), - // Value: to.Ptr("value"), - // }}, - // Protocol: to.Ptr("aaaa"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PreRules_CreateOrUpdate_MinimumSet_Gen.json -func ExamplePreRulesClient_BeginCreateOrUpdate_preRulesCreateOrUpdateMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewPreRulesClient().BeginCreateOrUpdate(ctx, "lrs1", "1", armpanngfw.PreRulesResource{ - Properties: &armpanngfw.RuleEntry{ - RuleName: to.Ptr("preRule1"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PreRulesResource = armpanngfw.PreRulesResource{ - // ID: to.Ptr("/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/lrs1/prerules/1"), - // Properties: &armpanngfw.RuleEntry{ - // RuleName: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaa"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PreRules_Delete_MaximumSet_Gen.json -func ExamplePreRulesClient_BeginDelete_preRulesDeleteMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewPreRulesClient().BeginDelete(ctx, "lrs1", "1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PreRules_Delete_MinimumSet_Gen.json -func ExamplePreRulesClient_BeginDelete_preRulesDeleteMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewPreRulesClient().BeginDelete(ctx, "lrs1", "1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PreRules_getCounters_MaximumSet_Gen.json -func ExamplePreRulesClient_GetCounters_preRulesGetCountersMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPreRulesClient().GetCounters(ctx, "lrs1", "1", &armpanngfw.PreRulesClientGetCountersOptions{FirewallName: to.Ptr("firewall1")}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.RuleCounter = armpanngfw.RuleCounter{ - // AppSeen: &armpanngfw.AppSeenData{ - // AppSeenList: []*armpanngfw.AppSeenInfo{ - // { - // Category: to.Ptr("aaaaaaaaaaaaaaaaaaa"), - // Risk: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaa"), - // StandardPorts: to.Ptr("aaaaaaaaaaaaaaaaaa"), - // SubCategory: to.Ptr("aaaaaaaaaaaaaaaaa"), - // Tag: to.Ptr("aaaaaaaaaa"), - // Technology: to.Ptr("aaaaaaaaaaaaaaaaaaaa"), - // Title: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - // }}, - // Count: to.Ptr[int32](13), - // }, - // FirewallName: to.Ptr("aaaaaaaaaaaaaaaaaa"), - // HitCount: to.Ptr[int32](20), - // LastUpdatedTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // Priority: to.Ptr("aaaaaaaaaaaaaaaaaaaa"), - // RequestTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // RuleListName: to.Ptr("aaaaaaaaaaaaaaaaaaa"), - // RuleName: to.Ptr("aaaa"), - // RuleStackName: to.Ptr("aaaaaaaaaaaaaaaaa"), - // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-09T05:08:24.229Z"); return t}()), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PreRules_getCounters_MinimumSet_Gen.json -func ExamplePreRulesClient_GetCounters_preRulesGetCountersMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPreRulesClient().GetCounters(ctx, "lrs1", "1", &armpanngfw.PreRulesClientGetCountersOptions{FirewallName: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.RuleCounter = armpanngfw.RuleCounter{ - // Priority: to.Ptr("aaaaaaaaaaaaaaaaaaaa"), - // RuleName: to.Ptr("aaaa"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PreRules_refreshCounters_MaximumSet_Gen.json -func ExamplePreRulesClient_RefreshCounters_preRulesRefreshCountersMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewPreRulesClient().RefreshCounters(ctx, "lrs1", "1", &armpanngfw.PreRulesClientRefreshCountersOptions{FirewallName: to.Ptr("firewall1")}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PreRules_refreshCounters_MinimumSet_Gen.json -func ExamplePreRulesClient_RefreshCounters_preRulesRefreshCountersMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewPreRulesClient().RefreshCounters(ctx, "lrs1", "1", &armpanngfw.PreRulesClientRefreshCountersOptions{FirewallName: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PreRules_resetCounters_MaximumSet_Gen.json -func ExamplePreRulesClient_ResetCounters_preRulesResetCountersMaximumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPreRulesClient().ResetCounters(ctx, "lrs1", "1", &armpanngfw.PreRulesClientResetCountersOptions{FirewallName: to.Ptr("firewall1")}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.RuleCounterReset = armpanngfw.RuleCounterReset{ - // FirewallName: to.Ptr("aaaaaaaaaaaaaaaaaa"), - // Priority: to.Ptr("aaaaaaa"), - // RuleListName: to.Ptr("aaaaa"), - // RuleName: to.Ptr("aaaaa"), - // RuleStackName: to.Ptr("aa"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/fdf43f2fdacf17bd78c0621df44a5c024b61db82/specification/paloaltonetworks/resource-manager/PaloAltoNetworks.Cloudngfw/preview/2022-08-29-preview/examples/PreRules_resetCounters_MinimumSet_Gen.json -func ExamplePreRulesClient_ResetCounters_preRulesResetCountersMinimumSetGen() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armpanngfw.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPreRulesClient().ResetCounters(ctx, "lrs1", "1", &armpanngfw.PreRulesClientResetCountersOptions{FirewallName: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.RuleCounterReset = armpanngfw.RuleCounterReset{ - // } -}