Ejemplo n.º 1
0
 protected override void ProcessRecord()
 {
     base.ProcessRecord();
     try
     {
         client?.Dispose();
         int timeout = GetPreferredTimeout();
         WriteDebug($"Cmdlet Timeout : {timeout} milliseconds.");
         client = new DataCatalogClient(AuthProvider, new Oci.Common.ClientConfiguration
         {
             RetryConfiguration = retryConfig,
             TimeoutMillis      = timeout,
             ClientUserAgent    = PSUserAgent
         });
         string region = GetPreferredRegion();
         if (region != null)
         {
             WriteDebug("Choosing Region:" + region);
             client.SetRegion(region);
         }
         if (Endpoint != null)
         {
             WriteDebug("Choosing Endpoint:" + Endpoint);
             client.SetEndpoint(Endpoint);
         }
     }
     catch (Exception ex)
     {
         TerminatingErrorDuringExecution(ex);
     }
 }
 /// <summary>Snippet for UpdateTagTemplate</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void UpdateTagTemplate1()
 {
     // Create client
     DataCatalogClient dataCatalogClient = DataCatalogClient.Create();
     // Initialize request argument(s)
     TagTemplate tagTemplate = new TagTemplate();
     // Make the request
     TagTemplate response = dataCatalogClient.UpdateTagTemplate(tagTemplate);
 }
Ejemplo n.º 3
0
 /// <summary>Snippet for GetIamPolicy</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetIamPolicyResourceNames()
 {
     // Create client
     DataCatalogClient dataCatalogClient = DataCatalogClient.Create();
     // Initialize request argument(s)
     IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
     // Make the request
     Policy response = dataCatalogClient.GetIamPolicy(resource);
 }
Ejemplo n.º 4
0
 /// <summary>Snippet for GetEntry</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetEntryResourceNames()
 {
     // Create client
     DataCatalogClient dataCatalogClient = DataCatalogClient.Create();
     // Initialize request argument(s)
     EntryName name = EntryName.FromProjectLocationEntryGroupEntry("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
     // Make the request
     Entry response = dataCatalogClient.GetEntry(name);
 }
Ejemplo n.º 5
0
 /// <summary>Snippet for GetTagTemplate</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetTagTemplate()
 {
     // Create client
     DataCatalogClient dataCatalogClient = DataCatalogClient.Create();
     // Initialize request argument(s)
     string name = "projects/[PROJECT]/locations/[LOCATION]/tagTemplates/[TAG_TEMPLATE]";
     // Make the request
     TagTemplate response = dataCatalogClient.GetTagTemplate(name);
 }
 /// <summary>Snippet for UpdateTag</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void UpdateTag1()
 {
     // Create client
     DataCatalogClient dataCatalogClient = DataCatalogClient.Create();
     // Initialize request argument(s)
     Tag tag = new Tag();
     // Make the request
     Tag response = dataCatalogClient.UpdateTag(tag);
 }
 /// <summary>Snippet for GetIamPolicy</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetIamPolicy()
 {
     // Create client
     DataCatalogClient dataCatalogClient = DataCatalogClient.Create();
     // Initialize request argument(s)
     string resource = "a/wildcard/resource";
     // Make the request
     Policy response = dataCatalogClient.GetIamPolicy(resource);
 }
 /// <summary>Snippet for GetEntry</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetEntry()
 {
     // Create client
     DataCatalogClient dataCatalogClient = DataCatalogClient.Create();
     // Initialize request argument(s)
     string name = "projects/[PROJECT]/locations/[LOCATION]/entryGroups/[ENTRY_GROUP]/entries/[ENTRY]";
     // Make the request
     Entry response = dataCatalogClient.GetEntry(name);
 }
Ejemplo n.º 9
0
 /// <summary>Snippet for GetTagTemplate</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetTagTemplateResourceNames()
 {
     // Create client
     DataCatalogClient dataCatalogClient = DataCatalogClient.Create();
     // Initialize request argument(s)
     TagTemplateName name = TagTemplateName.FromProjectLocationTagTemplate("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]");
     // Make the request
     TagTemplate response = dataCatalogClient.GetTagTemplate(name);
 }
Ejemplo n.º 10
0
 /// <summary>Snippet for UpdateEntry</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void UpdateEntry1()
 {
     // Create client
     DataCatalogClient dataCatalogClient = DataCatalogClient.Create();
     // Initialize request argument(s)
     Entry entry = new Entry();
     // Make the request
     Entry response = dataCatalogClient.UpdateEntry(entry);
 }
Ejemplo n.º 11
0
 /// <summary>Snippet for UpdateEntryGroup</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void UpdateEntryGroup1()
 {
     // Create client
     DataCatalogClient dataCatalogClient = DataCatalogClient.Create();
     // Initialize request argument(s)
     EntryGroup entryGroup = new EntryGroup();
     // Make the request
     EntryGroup response = dataCatalogClient.UpdateEntryGroup(entryGroup);
 }
Ejemplo n.º 12
0
 /// <summary>Snippet for GetEntryGroup</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetEntryGroup2ResourceNames()
 {
     // Create client
     DataCatalogClient dataCatalogClient = DataCatalogClient.Create();
     // Initialize request argument(s)
     EntryGroupName name     = EntryGroupName.FromProjectLocationEntryGroup("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
     FieldMask      readMask = new FieldMask();
     // Make the request
     EntryGroup response = dataCatalogClient.GetEntryGroup(name, readMask);
 }
 /// <summary>Snippet for UpdateTag</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void UpdateTag2()
 {
     // Create client
     DataCatalogClient dataCatalogClient = DataCatalogClient.Create();
     // Initialize request argument(s)
     Tag       tag        = new Tag();
     FieldMask updateMask = new FieldMask();
     // Make the request
     Tag response = dataCatalogClient.UpdateTag(tag, updateMask);
 }
Ejemplo n.º 14
0
        /// <summary>Snippet for GetIamPolicyAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task GetIamPolicyAsync()
        {
            // Create client
            DataCatalogClient dataCatalogClient = await DataCatalogClient.CreateAsync();

            // Initialize request argument(s)
            string resource = "a/wildcard/resource";
            // Make the request
            Policy response = await dataCatalogClient.GetIamPolicyAsync(resource);
        }
        /// <summary>Snippet for UpdateTagTemplateAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task UpdateTagTemplate1Async()
        {
            // Create client
            DataCatalogClient dataCatalogClient = await DataCatalogClient.CreateAsync();

            // Initialize request argument(s)
            TagTemplate tagTemplate = new TagTemplate();
            // Make the request
            TagTemplate response = await dataCatalogClient.UpdateTagTemplateAsync(tagTemplate);
        }
Ejemplo n.º 16
0
 /// <summary>Snippet for RenameTagTemplateField</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void RenameTagTemplateField()
 {
     // Create client
     DataCatalogClient dataCatalogClient = DataCatalogClient.Create();
     // Initialize request argument(s)
     string name = "projects/[PROJECT]/locations/[LOCATION]/tagTemplates/[TAG_TEMPLATE]/fields/[FIELD]";
     string newTagTemplateFieldId = "";
     // Make the request
     TagTemplateField response = dataCatalogClient.RenameTagTemplateField(name, newTagTemplateFieldId);
 }
        /// <summary>Snippet for UpdateEntryAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task UpdateEntry1Async()
        {
            // Create client
            DataCatalogClient dataCatalogClient = await DataCatalogClient.CreateAsync();

            // Initialize request argument(s)
            Entry entry = new Entry();
            // Make the request
            Entry response = await dataCatalogClient.UpdateEntryAsync(entry);
        }
 /// <summary>Snippet for CreateTag</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void CreateTag()
 {
     // Create client
     DataCatalogClient dataCatalogClient = DataCatalogClient.Create();
     // Initialize request argument(s)
     string parent = "projects/[PROJECT]/locations/[LOCATION]/entryGroups/[ENTRY_GROUP]/entries/[ENTRY]/tags/[TAG]";
     Tag    tag    = new Tag();
     // Make the request
     Tag response = dataCatalogClient.CreateTag(parent, tag);
 }
 /// <summary>Snippet for RenameTagTemplateFieldEnumValue</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void RenameTagTemplateFieldEnumValueResourceNames()
 {
     // Create client
     DataCatalogClient dataCatalogClient = DataCatalogClient.Create();
     // Initialize request argument(s)
     TagTemplateFieldEnumValueName name = TagTemplateFieldEnumValueName.FromProjectLocationTagTemplateTagTemplateFieldEnumValueDisplayName("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[TAG_TEMPLATE_FIELD_ID]", "[ENUM_VALUE_DISPLAY_NAME]");
     string newEnumValueDisplayName     = "";
     // Make the request
     TagTemplateField response = dataCatalogClient.RenameTagTemplateFieldEnumValue(name, newEnumValueDisplayName);
 }
        /// <summary>Snippet for UpdateEntryGroupAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task UpdateEntryGroup1Async()
        {
            // Create client
            DataCatalogClient dataCatalogClient = await DataCatalogClient.CreateAsync();

            // Initialize request argument(s)
            EntryGroup entryGroup = new EntryGroup();
            // Make the request
            EntryGroup response = await dataCatalogClient.UpdateEntryGroupAsync(entryGroup);
        }
 /// <summary>Snippet for UpdateTagTemplateField</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void UpdateTagTemplateField1ResourceNames()
 {
     // Create client
     DataCatalogClient dataCatalogClient = DataCatalogClient.Create();
     // Initialize request argument(s)
     TagTemplateFieldName name             = TagTemplateFieldName.FromProjectLocationTagTemplateField("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]");
     TagTemplateField     tagTemplateField = new TagTemplateField();
     // Make the request
     TagTemplateField response = dataCatalogClient.UpdateTagTemplateField(name, tagTemplateField);
 }
Ejemplo n.º 22
0
 /// <summary>Snippet for CreateTag</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void CreateTagResourceNames()
 {
     // Create client
     DataCatalogClient dataCatalogClient = DataCatalogClient.Create();
     // Initialize request argument(s)
     TagName parent = TagName.FromProjectLocationEntryGroupEntryTag("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]", "[TAG]");
     Tag     tag    = new Tag();
     // Make the request
     Tag response = dataCatalogClient.CreateTag(parent, tag);
 }
Ejemplo n.º 23
0
 /// <summary>Snippet for RenameTagTemplateFieldEnumValue</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void RenameTagTemplateFieldEnumValue()
 {
     // Create client
     DataCatalogClient dataCatalogClient = DataCatalogClient.Create();
     // Initialize request argument(s)
     string name = "projects/[PROJECT]/locations/[LOCATION]/tagTemplates/[TAG_TEMPLATE]/fields/[TAG_TEMPLATE_FIELD_ID]/enumValues/[ENUM_VALUE_DISPLAY_NAME]";
     string newEnumValueDisplayName = "";
     // Make the request
     TagTemplateField response = dataCatalogClient.RenameTagTemplateFieldEnumValue(name, newEnumValueDisplayName);
 }
        /// <summary>Snippet for GetIamPolicyAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task GetIamPolicyResourceNamesAsync()
        {
            // Create client
            DataCatalogClient dataCatalogClient = await DataCatalogClient.CreateAsync();

            // Initialize request argument(s)
            IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
            // Make the request
            Policy response = await dataCatalogClient.GetIamPolicyAsync(resource);
        }
 /// <summary>Snippet for UpdateEntryGroup</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void UpdateEntryGroup2()
 {
     // Create client
     DataCatalogClient dataCatalogClient = DataCatalogClient.Create();
     // Initialize request argument(s)
     EntryGroup entryGroup = new EntryGroup();
     FieldMask  updateMask = new FieldMask();
     // Make the request
     EntryGroup response = dataCatalogClient.UpdateEntryGroup(entryGroup, updateMask);
 }
 /// <summary>Snippet for GetEntryGroup</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetEntryGroup2()
 {
     // Create client
     DataCatalogClient dataCatalogClient = DataCatalogClient.Create();
     // Initialize request argument(s)
     string    name     = "projects/[PROJECT]/locations/[LOCATION]/entryGroups/[ENTRY_GROUP]";
     FieldMask readMask = new FieldMask();
     // Make the request
     EntryGroup response = dataCatalogClient.GetEntryGroup(name, readMask);
 }
Ejemplo n.º 27
0
        /// <summary>Snippet for DeleteEntryGroupAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task DeleteEntryGroupResourceNamesAsync()
        {
            // Create client
            DataCatalogClient dataCatalogClient = await DataCatalogClient.CreateAsync();

            // Initialize request argument(s)
            EntryGroupName name = EntryGroupName.FromProjectLocationEntryGroup("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
            // Make the request
            await dataCatalogClient.DeleteEntryGroupAsync(name);
        }
        /// <summary>Snippet for DeleteEntryGroupAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task DeleteEntryGroupAsync()
        {
            // Create client
            DataCatalogClient dataCatalogClient = await DataCatalogClient.CreateAsync();

            // Initialize request argument(s)
            string name = "projects/[PROJECT]/locations/[LOCATION]/entryGroups/[ENTRY_GROUP]";
            // Make the request
            await dataCatalogClient.DeleteEntryGroupAsync(name);
        }
Ejemplo n.º 29
0
        /// <summary>Snippet for DeleteTagTemplateAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task DeleteTagTemplateResourceNamesAsync()
        {
            // Create client
            DataCatalogClient dataCatalogClient = await DataCatalogClient.CreateAsync();

            // Initialize request argument(s)
            TagTemplateName name  = TagTemplateName.FromProjectLocationTagTemplate("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]");
            bool            force = false;
            // Make the request
            await dataCatalogClient.DeleteTagTemplateAsync(name, force);
        }
 /// <summary>Snippet for CreateTagTemplateField</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void CreateTagTemplateFieldResourceNames()
 {
     // Create client
     DataCatalogClient dataCatalogClient = DataCatalogClient.Create();
     // Initialize request argument(s)
     TagTemplateName  parent             = TagTemplateName.FromProjectLocationTagTemplate("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]");
     string           tagTemplateFieldId = "";
     TagTemplateField tagTemplateField   = new TagTemplateField();
     // Make the request
     TagTemplateField response = dataCatalogClient.CreateTagTemplateField(parent, tagTemplateFieldId, tagTemplateField);
 }